安装Apache
[[email protected] ~]# yum install -y httpd
安装Subversion
[[email protected] ~]# yum install -y subversion
安装Apache SVN模块
[[email protected] ~]# yum install -y mod_dav_svn
建立SVN库
[[email protected] ~]# mkdir -p /venwa/svn/svn_data
[[email protected] ~]# mkdir -p /venwa/svn/svn_conf
[[email protected] ~]# svnadmin create /venwa/svn/svn_data/venwa_data
[[email protected] ~]# chown -R apache.apache venwa_data
添加Subversion账号
[[email protected] ~]# htpasswd -c /venwa/svn/svn_conf/passwdfile Venwa
修改/venwa/svn/svn_data/venwa_data/conf/svnserve.conf 内容如下:
[[email protected] ~]# vim /venwa/svn/svn_data/venwa_data/conf/svnserve.conf
password-db = /venwa/svn/svn_conf/passwd
authz-db = /venwa/svn/svn_conf/authz
修改认证文件
[[email protected] ~]# vim /venwa/svn/svn_conf/authz
[venwa_data:/]
Venwa = rw
修改/etc/httpd/conf.d/subversion.conf,内容如下
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location />
DAV svn
SVNParentPath /venwa/svn/svn_data
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /venwa/svn/svn_conf/passwdfile
AuthzSVNAccessFile /venwa/svn/svn_conf/authz
Require valid-user
</Location>
[[email protected] ~]# /etc/init.d/httpd start
浏览器访问
http://ip和apache端口/venwa_data