CentOS 6.8下SVN服务器搭建及使用(3)

③修改后的参数(可以用sed替换,也可用vi/vim直接修改)
[root@node-005 conf]# egrep "\-access|\-db =" svnserve.conf
# anon-access = none  #不允许匿名访问
# auth-access = write  #允许可写
# password-db = /application/svnpasswd/passwd  #密码数据库,存放SVN吗
# authz-db = /application/svnpasswd/authz      #控制权限的数据库

另:修改后对比
[root@node-005 conf]# egrep "\-access|\-db =" svnserve.conf
# anon-access = read
anon-access = none
# auth-access = write
auth-access = write
# password-db = passwd
password-db = /application/svnpasswd/passwd
# authz-db = authz
authz-db = /application/svnpasswd/authz
[root@node-005 conf]# diff svnserve.conf.solin2017-04-20 svnserve.conf
12a13
> anon-access = none
13a15
> auth-access = write
20a23
> password-db = /application/svnpasswd/passwd
27a31
> authz-db = /application/svnpasswd/authz

3、配置authz、passwd证书文件
(1)把密码证书文件模板复制到相关目录并修改文件权限
[root@node-005 conf]# cp authz passwd /application/svnpasswd/
[root@node-005 conf]# ll /application/svnpasswd/
总用量 8
-rw-r--r-- 1 root root 1080 4月  20 17:22 authz
-rw-r--r-- 1 root root  309 4月  20 17:22 passwd
[root@node-005 conf]# chmod 700 /application/svnpasswd/*
[root@node-005 conf]# ll /application/svnpasswd/
总用量 8
-rwx------ 1 root root 1080 4月  20 17:22 authz
-rwx------ 1 root root  309 4月  20 17:22 passwd

(2)authz、passwd的配置
vi /application/svnpasswd/authz

添加如下:
[groups]
bd_sa = solin,test
# [/foo/bar]
[sadoc:/]
# [repository:/baz/fuz]
@bd_sa = rw
test1 = r

vi /application/svnpasswd/passwd

添加如下:
[users]
solin = bdyun
test = bdyun


 
4、重启SVN
[root@node-005 conf]# pkill svnserve
[root@node-005 conf]# ps -ef |grep svn
root      68326658  0 17:52 pts/0    00:00:00 grep svn
[root@node-005 conf]# svnserve -d -r /application/svndata/
[root@node-005 conf]# ps -ef |grep svn
root      68341  0 17:52 ?        00:00:00 svnserve -d -r /application/svndata/
root      68366658  0 17:52 pts/0    00:00:00 grep svn

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/18a3af795901c56fcf051d9be74f2900.html