一、所需要安装的软件包:
- [root@svn ~]# yum -y install openssl openssl-devel
- [root@svn svn]# tar zxvf httpd-2.2.22.tar.gz
- [root@svn svn]# cd httpd-2.2.22
- [root@svn httpd-2.2.22]# ./configure --prefix=/usr/local/apache2 --enable-dav --enable-so --enable-modules=most
- [root@svn httpd-2.2.22]# make && make install
- [root@svn ~]# cp -p /usr/local/apache2/bin/apachectl /etc/init.d/httpd
- [root@svn ~]# cd /etc/rc3.d/
- [root@svn rc3.d]# ln -s /etc/init.d/httpd S80httpd
- [root@svn svn]# tar zxvf apr-1.3.8.tar.gz
- [root@svn svn]# cd apr-1.3.8
- [root@svn apr-1.3.8]# ./configure --prefix=/usr/local/apr
- [root@svn apr-1.3.8]# make && make install
- [root@svn svn]# tar zxvf apr-util-1.3.9.tar.gz
- [root@svn svn]# cd apr-util-1.3.9
- [root@svn apr-util-1.3.9]# ./configure --prefix=/usr/local/apr-util
- --with-apr=/usr/local/apr/
- [root@svn apr-util-1.3.9]# make && make install
- [root@svn svn]# tar zxvf sqlite-autoconf-3071000.tar.gz
- [root@svn svn]# cd sqlite-autoconf-3071000
- [root@svn sqlite-autoconf-3071000]# ./configure --prefix=/usr/local/sqlite
- [root@svn sqlite-autoconf-3071000]# make && make install
- [root@svn svn]# tar zxvf subversion-1.7.3.tar.gz
- [root@svn svn]# cd subversion-1.7.3
- [root@svn subversion-1.7.3]# ./configure --prefix=/usr/local/svn
- --with-apxs2=/usr/local/apache2/bin/apxs
- --with-apr=/usr/local/apr/
- --with-apr-util=/usr/local/apr-util/
- --with-sqlite=/usr/local/sqlite/ --with-ssl --with-zlib
- [root@svn subversion-1.7.3]# make && make install
- 65 User apache 66 Group apache
- 104 DocumentRoot "/www"
- 131 <Directory "/www">
- 53 LoadModule dav_svn_module modules/mod_dav_svn.so
- 54 LoadModule authz_svn_module modules/mod_authz_svn.so
- <Location /svn> #代表要访问的仓库的父目录
- DAV svn #svn根目录
- SVNParentPath /data/svn
- AuthType Basic
- AuthName "SVNTest"
- AuthzSVNAccessFile /data/svn/authz.conf #svn认证文件,创建authz.conf
- AuthUserFile /data/svn/authfile #apache认证文件
- Require valid-user
- </Location>
- [root@svn ~]# mkdir -m 755 /www
- [root@svn ~]# /usr/local/apache2/bin/apachectl start
- [root@svn ~]# mkdir -p /data/svn
- [root@svn ~]# /usr/local/svn/bin/svnadmin create /data/svn/test
- [root@svn ~]# /usr/local/apache2/bin/htpasswd -cm /data/svn/authfile admin
- [root@svn ~]# chown -R apache:apache /data/svn
- [root@svn ~]# vim /data/svn/authz.conf
- [groups]
- adminadmin=admin
- [/]
- @admin=rw