1.安装
yum -y install subversion
验证
svnserve --version
2.配置目录
mkdir -p /opt/svn
svnadmin create /opt/svn/data1
3.配置服务conf/svnserve.conf
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
4.配置用户和密码conf/passwd
[users]
harry = harryssecret
sally = sallyssecret
joe = joesecret
5.配置目录访问权限conf/authz
[groups]
admin = harry,sally
devteam = joe
[/]
@admin=rw
*=
[/dir1]
@devteam=rw
解释:
用户组:admin,devteam,组内组员用逗号分隔
admin对根目录/有读写权限,其它用户没有访问权限
devteam对/dir1有读写权限
6.启动和停止
svnserve -d -r /opt/snv/data1
ps -ef|grep svn|grep -v grep|awk '{print $2}'|xargs kill -9