创建项目库目录
svnadmin created /svn/newsem
验证svn用户,并授权
[root@localhost newsem]# ls
conf dav db format hooks locks README.txt
[root@localhost newsem]# pwd
/svn/newsem
编辑conf目录下文件
authz passwd svnserve.conf
svnserver.conf修改
anon-access = none
auth-access = write
password-db = passwd------密码验证
authz-db = authz----------用户登录验证
编辑passwd
[users]
# harry = harryssecret
# sally = sallyssecret
admin = admin
编辑authz
[groups]
# harry_and_sally = harry,sally
admin = admin
[newsem:/]
@admin = rw1
将文件checkout到本地目录
svn checkout path(path是服务器上的目录)
svn co --username=admin --password=admin svn://192.168.10.222/newsem /home/web/newsem
windows安装clinet验证
网上一大堆自己找
OK
自动提交应用web
创建该文件
[root@localhost newsem]# cd hooks/
[root@localhost hooks]# pwd
/svn/newsem/hooks
[root@localhost hooks]# ll
-rwxrwxrwx 1 root root 209 8月 11 14:40 post-commit
修改它
#!/bin/sh
#exec >/tmp/svn-up.out 2>&1
REPOS="$1"
REV="$2"
SVNLOG=/svn/svn.log
WEB=/home/web/newsem
export LANG=en_US.UTF-8
/usr/local/bin/svn update $WEB --username admin --password admin --non-interactive
赋予权限chmod 777
windows验证是否同步
转载于:https://blog.51cto.com/xinyuoba/1683652