CentOS7:配置SVN服务器

  • A+
所属分类:Notes

yum install subversion
which svnserve
svnserve --version
systemctl cat svnserve.service

修改默认版本库位置:
vim /etc/sysconfig/svnserver
OPTIONS="-r /home/svn"

使用svnadmin建立版本库sapteam
mkdir -p /home/svn/sapteam
svnadmin create /home/svn/sapteam
ll /home/svn/sapteam

编辑用户文件passwd,新增两个用户:admin和guest。
cat /home/svn/sapteam/conf/passwd
[users]
admin = admin
guest = guest

编辑权限文件authz,用户admin设置可读写权限,guest设置只读权限。
$ cat /home/svn/sapteam/conf/authz
[/]
admin = rw
guest = r

编辑svnserve.conf:
[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
[sasl]

启动SVN服务:
systemctl start svnserve.service
systemctl enable svnserve.service

防火墙增加telnet服务器和3690端口:
firewall-cmd --permanent --add-service=telnet
firewall-cmd --permanent --add-port=3690/tcp
firewall-cmd --reload

客户端checkout版本库,再调价文件即可使用。

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: