Blogger Information
Blog 2
fans 0
comment 0
visits 3733
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Centos SVN服务搭建
二狗子的博客
Original
814 people have browsed it
  1. yum install subversion -y   //安装svn

  2. mkdir /opt/project1 //创建SVN项目目录

  3. cd /opt/project1 //切换到这个目录

  4. svnadmin create project //创建一个SVN仓库,名为project

  5. cd /opt/project1/project/conf //切换到SVN仓库配置文件

  6. vi svnserve.conf     取消注释anon-access并修改值为none 取消注释password-db 取消注释authz-db = authz,注意前边不要留空格,然后保存退出

  7. vi authz //添加一行   username = rw  (username=用户名 rw=读写)

  8. vi passwd //添加一行 username = password (username=authz里的用户名,password=设置的密码)

  9. 创建站点目录,例如:/home/web1,如果有请忽略,创建SVN日志文件 例如:/opt/project1/log,相关命令(mkdir 创建目录 touch 创建文件)

  10. 修改日志文件权限 chmod 777 日志文件

  11. cd /opt/project1/project/hooks //切换到hooks目录

  12. vi post-commit //文件内容为:#!/bin/bash#换行#REPOS="$1"#换行#REV="$2"#换行#export LANG=zh_CN.UTF-8#换行#echo "Code Deployed at `date "+%Y-%m-%d %H:%M"`" >> 日志文件路径#换行#/usr/bin/svn update --username 刚才设置的usename --password 刚才设置的password 站点目录

  13. /usr/bin/svn checkout svn://服务器ip:端口/project 站点目录  //默认3690端口可以不写,其他端口请指定

  14. svnserve -d -r svn仓库的目录 //启动SVN服务

  15. 直接提交代码就可以了,自动发布到站点目录

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post