安装apache
将apr-1.4.6.tar.gz apr-util-1.4.1.tar.gz pcre-8.31.zip 解压到
httpd-2.4.2/srclib文件夹下,解压为apr apr-util pcre文件夹
./configure --prefix=/app/os/app/apache2 --with-included-apr --with-included-apr-util --with-included-pcre --enable-so --enable-dav --enable-rewrite --enable-ssl --enable-maintainer-mode
make
make install
----------------------
安装svn
将sqlite-amalgamation-3071300.zip解压到
subversion-1.7.6/sqlite-amalgamation中
./configure --prefix=/app/os/app/subversion-1.7.6 --with-apxs=/app/os/app/apache2/bin/apxs --with-apr=/app/os/app/apache2/bin/apr-1-config --with-apr-util=/app/os/app/apache2/bin/apu-1-config --with-ssl --with-zlib --enable-maintainer-mode --without-berkeley-db
make
make install
-------------------
配置apache2
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
配置svn
svnadmin create /app/os/src/svnsrc
配置apache
htpasswd -c /app/os/src/svnpasswd user1
htpasswd /app/os/src/svnpasswd user2
<Location /svn>
DAV svn
SVNPath /app/os/src/svnsrc
AuthzSVNAccessFile /app/os/src/svnauth.conf
AuthType Basic
AuthName "Subversion.BSR"
AuthUserFile /app/os/src/svnpasswd
Require valid-user
</Location>
---------------------------------------
配置ssl
生成公钥和私钥
openssl genrsa 1024 > host.key
chmod 400 host.key
openssl req -new -x509 -nodes -sha1 -days 365 -key host.key > host.cert
cat host.cert host.key > host.pem
chmod 400 host.pem
放开httpd.conf中的Include conf/extra/httpd-ssl.conf
将
<Location /svn>
DAV svn
SVNPath /app/os/src/svnsrc
AuthzSVNAccessFile /app/os/src/svnauth.conf
AuthType Basic
AuthName "Subversion.BSR"
AuthUserFile /app/os/src/svnpasswd
Require valid-user
SSLRequireSSL
</Location>
增加SSLRequireSSL
修改extra/httpd-ssl.conf文件
Listen 9011
<VirtualHost _default_:9011>
SSLCertificateFile "/app/os/ssl/apache2.cert"
SSLCertificateKeyFile "/app/os/ssl/apache2.key"
svnserve –d –r /app/os/src/svnsrc 启动服务, 以deamon方式运行。
apachectl start
将apr-1.4.6.tar.gz apr-util-1.4.1.tar.gz pcre-8.31.zip 解压到
httpd-2.4.2/srclib文件夹下,解压为apr apr-util pcre文件夹
./configure --prefix=/app/os/app/apache2 --with-included-apr --with-included-apr-util --with-included-pcre --enable-so --enable-dav --enable-rewrite --enable-ssl --enable-maintainer-mode
make
make install
----------------------
安装svn
将sqlite-amalgamation-3071300.zip解压到
subversion-1.7.6/sqlite-amalgamation中
./configure --prefix=/app/os/app/subversion-1.7.6 --with-apxs=/app/os/app/apache2/bin/apxs --with-apr=/app/os/app/apache2/bin/apr-1-config --with-apr-util=/app/os/app/apache2/bin/apu-1-config --with-ssl --with-zlib --enable-maintainer-mode --without-berkeley-db
make
make install
-------------------
配置apache2
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
配置svn
svnadmin create /app/os/src/svnsrc
配置apache
htpasswd -c /app/os/src/svnpasswd user1
htpasswd /app/os/src/svnpasswd user2
<Location /svn>
DAV svn
SVNPath /app/os/src/svnsrc
AuthzSVNAccessFile /app/os/src/svnauth.conf
AuthType Basic
AuthName "Subversion.BSR"
AuthUserFile /app/os/src/svnpasswd
Require valid-user
</Location>
---------------------------------------
配置ssl
生成公钥和私钥
openssl genrsa 1024 > host.key
chmod 400 host.key
openssl req -new -x509 -nodes -sha1 -days 365 -key host.key > host.cert
cat host.cert host.key > host.pem
chmod 400 host.pem
放开httpd.conf中的Include conf/extra/httpd-ssl.conf
将
<Location /svn>
DAV svn
SVNPath /app/os/src/svnsrc
AuthzSVNAccessFile /app/os/src/svnauth.conf
AuthType Basic
AuthName "Subversion.BSR"
AuthUserFile /app/os/src/svnpasswd
Require valid-user
SSLRequireSSL
</Location>
增加SSLRequireSSL
修改extra/httpd-ssl.conf文件
Listen 9011
<VirtualHost _default_:9011>
SSLCertificateFile "/app/os/ssl/apache2.cert"
SSLCertificateKeyFile "/app/os/ssl/apache2.key"
svnserve –d –r /app/os/src/svnsrc 启动服务, 以deamon方式运行。
apachectl start