OPTS=””
OPTS=”${OPTS} --prefix=$PREFIX ”
OPTS=”${OPTS} --enable-shared ”
OPTS=”${OPTS} --enable-dso ”
OPTS=”${OPTS} --enable-dav ”
OPTS=”${OPTS} --enable-dav-fs ”
OPTS=”${OPTS} --with-swig=$PREFIX ”
OPTS=”${OPTS} --with-ssl ”
OPTS=”${OPTS} --with-pic ”
OPTS=”${OPTS} --with-zlib ”
#OPTS=”${OPTS} --with-apache=$MYSRC/httpd-2.0.54 ”
OPTS=”${OPTS} --with-apxs=$PREFIX/bin/apxs ”
OPTS=”${OPTS} --with-apr-util=$PREFIX/bin/apu-config ”
OPTS=”${OPTS} --with-apr=$PREFIX/bin/apr-config ”
OPTS=”${OPTS} --with-neon=$PREFIX ”
---------------------------------------------
chown apache:apache /var/svn/repos/test -R
groupadd svnusers
usermod -G apache,svnusers apache
chgrp svnusers /var/svn/repos/test -R
chmod g+w /var/svn/repos/test -R
請使用以下命令來啟動apache2:
/etc/init.d/apache2 start
如果你想要apache開機就啟動,請運行:
rc-update add apache2 default
./configure --prefix=/usr/local --enable-dav --enable-so --disable-nls --disable-ipv6
$ svnadmin create ~/subversion/repos
$ svn mkdir file:///home/user/subversion/repos/www
$ cd ~/subversion/repos/www
$ svn add index.php
$ svn commit
# mkdir /usr/local/subversion
# chown alex:alex /usr/local/subversion
# chmod g+s /usr/local/subversion
# svnadmin create /usr/local/subversion/repos
cd /opt
mkdir downloads
cd /opt/downloads/
wget
http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz
wget
http://subversion.tigris.org/downloads/subversion-deps-1.4.6.tar.gz
tar zxvf subversion-1.4.6.tar.gz
tar zxvf subversion-deps-1.4.6.tar.gz
cd subversion-1.4.6
cd apr
./configure --with-apxs=/opt/lampp/bin/apxs
./configure --prefix=/usr/local/apr-util/ --with-apxs=/opt/lampp/bin/apxs --with-apr=/usr/local/apr/bin/
----------------------------------------
Check below 2 files. If you build subversion from source and assign the apache path, the process of building subversion will copy the 2 files into the apache modules path
mod_authz_svn.so
mod_dav_svn.so
----------------------------------------
DAV svn
SVNPath d:/opt/svn/repos
AuthType Basic
AuthName ”Win Subversion Repository”
AuthUserFile d:/opt/svn/svnpasswd.file
Require valid-user
----------------------------------------
Make sure the below 4 config in httpd.conf is unmarked.
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule authz_svn_module modules/mod_authz_svn.so
$apache$/bin/htpasswd -cb $Your password path$/svnpasswd.file user pass
$apache$/bin/apachectl -f $apache$/etc/httpd.conf -k restart