Apache安装
wget http://archive.apache.org/dist/httpd/httpd-2.2.27.tar.gz
tar xf httpd-2.2.27.tar.gz
cd httpd-2.2.27
./configure --prefix=/usr/local/apache-2.2.27 --with-included-apr --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support --disable-userdir --enable-dav --enable-dav-fs
make && make install
ln -s /usr/local/apache-2.2.27 /usr/local/apache2
2.SVN安装
wget http://www.webdav.org/neon/neon-0.29.6.tar.gz
tar xf neon-0.29.6.tar.gz
cd neon-0.29.6
./configure
make && make install
wget https://archive.apache.org/dist/subversion/subversion-1.7.5.tar.gz
tar xf subversion-1.7.5.tar.gz
cd subversion-1.7.5
./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache2/bin/apxs --with-ssl --with-neon
make && make install
3.Aapache配置
vi httpd.conf加入如下模块:
1)加载SVN模块
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
2)统一SVN和Apache的权限
User puppet
Group puppet
ServerName 127.0.0.1
3)设置SVN发布目录和权限
<Location /svn>
Order allow,deny
Allow from all
Dav svn
SvnParentPath /data/svn
SvnListParentPath On
SvnAutoversioning On
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /usr/local/apache2/conf/authfile
Require valid-user
</Location>
4)设置SVN管理账号的信息和密码
/usr/local/apache2/bin/htpasswd -c /usr/local/apache2/conf/authfile USRNAME
4.启动Apache
/usr/local/apache2/bin/apachectl
转载于:https://blog.51cto.com/liuk1303/1829721