1. 下载和编译以下软件
########################################
tar zxvf openssl-1.0.1g.tar.gz
cd openssl-1.0.1g
./configure --prefix=/usr/local/openssl -fPIC
make
make install
cd ..
########################################
tar zxvf pcre-8.35.tar.gz
cd pcre-8.35
./configure --prefix=/usr/local/pcre
make
make install
cd ..
########################################
tar zxvf apr-1.5.1.tar.gz
cd apr-1.5.1
./configure --prefix=/usr/local/apr
make
make install
cd ..
########################################
tar zxvf apr-util-1.5.3.tar.gz
cd apr-util-1.5.3
./configure --prefix=/usr/local/apr-util
make
make install
cd ..
2. 编译安装httpd
#########################################
tar zxvf httpd-2.4.9.tar.gz
cd httpd-2.4.9
./configure --prefix=/usr/local/apache --enable-dav --enable-so --enable-deflate=shared --enable-ssl --enable-expires=shared --enable-headers=shared --enable-rewrite=shared --enable-static-support --with-mpm=prefork --enable-cache --enable-file-cache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --with-ssl=/usr/local/openssl
make
make install
cd ..
cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
编辑/etc/init.d/httpd
在#!/bin/sh后面加入下面两行
#chkconfig:345 85 15
#description: Start and stops the Apache HTTP Server.
chkconfig --add /etc/init.d/httpd
service httpd start
3.编译和安装subversion
tar zxvf subversion-1.8.8.tar.gz
cd subversion-1.8.8
#make clean
./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-sqlite=/usr/local/sqlite --with-openssl
make
make install
cd ..
\cp -f subversion-1.8.8/subversion/mod_dav_svn/.libs/mod_dav_svn.so /usr/local/apache/modules/
\cp -f subversion-1.8.8/subversion/mod_authz_svn/.libs/mod_authz_svn.so /usr/local/apache/modules/
echo "PATH=$PATH/:/usr/local/subversion/bin" >> /etc/profile
source /etc/profile
4.修 改httpd.conf
vim /usr/local/apache/conf/httpd.conf
添加以下代码:
<Location /svn>
DAV svn
SVNParentPath /data/svn
AuthType Basic
AuthName "PleaseLogin"
AuthUserFile /usr/local/apache/svn-passwd
AuthzSVNAccessFile /usr/local/apache/svn-access
Require valid-user
SSLRequireSSL
</Location>
由于在httpd.conf中增加了SSLRequireSSL,则只支持https访问。
5.用以下三步生成证书
7.
创建访问控制文件,设置用户访问权限
chown -R svn:svn /data/svn/project-1
9.重启httpd
service httpd restart