Installing Subversion:yum install-y Subversion
Check if the installation was successful: SVN--version
Create a warehouse directory: Mkdir-p/home/svn/test
Create Project: Svnadmin create/home/svn/test
Check whether the creation was successful:
(1) Cd/home/svn/test
(2) LL #查看生成文件
6.cd/home/svn/test/conf #进入目录有文件 Authz, passwd, svnserve.conf
7.vim Authz #设置用户权限 added in the back
[/]
admin = RW
8.vim passwd #设置用户密码
[User]
admin = 123456
9.vim svnserve.conf #设置去掉注释
Anon-access = Read
auth-access = Write
Password-db = passwd
Authz-db = Authz
Realm =/home/svn/test #写自己的创库
10. Start SVN service: svnserve-d-r/home/svn * Note *: not svnserve-d-r/home/svn/test
11. Install the TORTOISESVN test address locally: SVN://IP address/test Enter the user password
12. Enable automatic synchronization
#例如: Your Web directory is/www/web
(1) Cd/home/svn/test/hooks
(2) CP Post-commit.tmpl Post-commit
(3) Vim post-commit #设置
export LANG=ZH_CN. UTF-8
SVN Co svn://47.92.168.214/test/www/web
Log_path=/tmp/svn_test.log
Web=/www/web
Repos= "$"
rev= "$"
SVN update--username admin--password 123456 $WEB--no-auth-cache >> $LOG _path
Save exit
13.killall Svnserve
14.svnserve-d-R/HOME/SVN #重启服务
CentOS6.8 build svn and automatically sync to web directory with hooks