CentoOS7搭建svn

1.安装httpd subversion

# yum install -y httpd subversion mod_dav_svn

2.创建svn库

# mkdir /cust/data/svn/repos
# svnadmin create /cust/data/svn/repos/
# vim /cust/data/svn/repos/conf/svnserve.conf  #修改以下4行
anon-access = none
auth-access = write
password-db =  /cust/data/svn/repos/conf/conf/passwd		#指向用户配置文件
authz-db =  /cust/data/svn/repos/conf/authz			#指向权限配置文件

3.svn整合apache

# cat /etc/httpd/conf.d/subversion.conf
<Location /svn>
   DAV svn
   SVNParentPath /cust/data/svn/
   AuthType Basic
   AuthName "Authorization"
   AuthUserFile /cust/data/svn/repos/conf/passwd
   AuthzSVNAccessFile /cust/data/svn/repos/conf/authz
   Require valid-user
</Location>

4.修改svn目录权限

# chown apache.apache -R /cust/data/svn/

5.创建svn账户密码 以及授权

# htpasswd -c /cust/data/svn/repos/conf/passwd sxg	#第一次创建需要 -c
# htpasswd  /cust/data/svn/repos/conf/passwd admin		#第二次创建不需要
# cat /cust/data/svn/repos/conf/passwd		#在最前面加[users]
[users]
sxg:$apr1$UREtRz.u$cL2wMvlJU3KlOMM9kRqtY0
admin:$apr1$XhnL6dUi$sDngtrgaLR0.DfLqsyBZc.


# cat /cust/data/svn/repos/conf/authz 		#授权
[groups]
admingrp=admin,sxg

[repos:/]
@admingrp=rw

**6.启动httpd **

# systemctl restart httpd
# systemctl enable httpd

7.访问地址

yourip/svn/repos
上一篇:MB51 选择屏幕增加字段


下一篇:MySQL存储过程返回多个值