该配置依赖apache httpd,httpd配置链接
1.从http://subversion.apache.org 下载subversion,此处为subversion-1.7.6.tar.gz
2. 从http://sqlite.org下载sqlite,此处为sqlite-amalgamation-3071401.zip
3.yum install zlib-devel
4.解压sqlite,#unzip sqlite-amalgamation-3071401.zip
5. 解压subversion,#tar zxf subversion-1.7.6.tar.gz
![](/qrcode.jpg)
6.将sqlite解压后的目录去掉版本号后,移入subversion解压后的目录
7.安装SVN,#./configure --prefix=/usr/local/subversion --with-zlib=/usr/local/zlib
8.修改httpd.conf文件,找到下面三行,去掉前面的#,如果找不到,则加上这三行
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
9.在http.conf的末尾加上如下代码:
<Location /repos>
DAV svn
SVNParentPath /var/svn/
# Authentication: Digest
AuthName "Subversion repository"
AuthType Digest
AuthUserFile /etc/svn-auth.htdigest
# Authorization: Authenticated users only
Require valid-user
# Authorization: Path-based access control
AuthzSVNAccessFile /etc/svn-access
SSLRequireSSL
</Location>
10.创建用户,#htdigest /etc/svn-auth.htdigest "Subversion repository" username(如果svn-auth.htdighet文件不存在,可以加-c选项)
11.设置SVN访问权限,#vi /etc/svn-access,
12.修改/var/svn/的访问权限,#chmod -R 777 /var/svn
13.创建svn库,#./svnadmin create /var/svn/project1(/var/svn目录必须已存在)
14.配置访问控制文件
[groups]
all=lan,ice
rome=lan,ice
[/]
@all=r
lan=rw
[rome:/]
@rome=rw
15.通过https://localhost/repos/project1访问svn