centos 下配置subversion(svn 以svnserve模式运行)

来源:互联网 发布:南通seo招聘 编辑:程序博客网 时间:2024/06/02 17:25

1. root登陆centos, 执行命令:

yum install subversion

安装完成。

2. 创建svn版本库目录:

mkdir /root/.svnrepos/my-repos
svnadmin create --fs-type fsfs /root/.svnrepos/my-repos/


3. 配置权限:注意每行前面不能有空格:

/root/.svnrepos/my-repos/conf/authz  文件参考:

[aliases]# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average[groups]admin = andy# harry_sally_and_joe = harry,sally,&joe# [/foo/bar]# harry = rw# &joe = r# * =[/]@admin = rw


/root/.svnrepos/my-repos/conf/passwd 文件参考:

[users]andy = 123456


/root/.svnrepos/my-repos/conf/svnserve.conf 文件,打开如下行(每行前面不能有空格):

auth-access = writeauthz-db = authzpassword-db = passwd


4. 在后台运行svn, (需要要指定配置文件的位置):

/usr/bin/svnserve -d --listen-port 3690 -r /root/.svnrepos/my-repos/ --log-file /var/log/svn.log --pid-file /var/log/svn.pid --listen-host 192.168.1.17 --config-file /root/.svnrepos/my-repos/conf/svnserve.conf