Jusene's Blog

http协议的svn服务器搭建

字数统计: 245阅读时长: 1 min
2017/06/18 Share

svn

svn开放源代码的版本控制系统,一款经典的版本控制系统,虽然git如今也已经越来越流行,但是历史原因,svn还是无法被代替的存在。

配置基于httpd的svn

1
~]# yum install -y subversion httpd mod_dav_svn

创建svn版本库

1
~]# mkdir -p /home/svn
2
~]# cd /home/svn
3
~]# svnadmin create /home/svn/repo1
4
~]# svnadmin create /home/svn/repo2
5
~]# chown -R apache.apache /home/svn
6
~]# cp /home/svn/repo1/conf/authz /home/svn/
7
~]# cat /home/svn/authz
8
[groups]
9
admin=admin
10
proj1=user1
11
proj2=user2
12
[/]
13
@admin=rw
14
15
[repo1:/]
16
@proj1=rw
17
18
[repo2:/]
19
@proj2=rw
20
21
~]# htpasswd -c /home/svn/passwd user1
22
~]# htpasswd /home/svn/passwd admin

设置httpd

1
~]# cat /etc/httpd/conf.d/svn.conf
2
LoadModule dav_svn_module     modules/mod_dav_svn.so
3
LoadModule authz_svn_module   modules/mod_authz_svn.so
4
<Location /repos>
5
      DAV svn
6
   	  SVNParentPath /home/svn
7
      AuthType Basic
8
      AuthName "Authorization SVN"
9
      AuthzSVNAccessFile /home/svn/authz
10
      AuthUserFile /home/svn/passwd
11
      Require valid-user
12
</Location>
1
~]# systemctl start httpd
CATALOG
  1. 1. svn
  2. 2. 配置基于httpd的svn