This is an old revision of the document!


Subversion on apache2

A lot of this wiki is borrowed from the subversion install-manual, and spiced up with some experience :-)

During the build anc configure process you might need some packages.. Just get them by apt-get, and retry.. Quite easy.

Running the Apache2 server is quite limited, but it works great, and finally I can get through “stupid” corporate firewalls (port 80).

1: Apache

I only managed to get it to work with Apache 2.0, and NOT 2.2. There is a lot of trouble with Apache versions and APR versions. After a couple of days of investigation i discovered: Apache 2.0.60 + SVN 1.4.2 works with APR 0.9.14 (and the APR-utils)

I never managed to get Apache 2.2.* to work with any APR version

Cleanup

First off, if you have any Subversion libraries lying around from previous 'make installs', clean them up first!

# rm -f /usr/local/lib/libsvn*
# rm -f /usr/local/lib/libapr*
# rm -f /usr/local/lib/libexpat*
# rm -f /usr/local/lib/libneon*

Get apache source

Find a place to download the apache source.

$ svn co http://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x httpd-2.0

Checkout the “apr” and “apr-util” modules into the srclib/ directory:

$ cd httpd-2.0/srclib
$ svn co http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x apr
$ svn co http://svn.apache.org/repos/asf/apr/apr-util/branches/0.9.x apr-util

build, configure and install

At the top of the httpd-2.0 tree: (the apache will be installed at /usr/local/apache2.. else change the prefix)

$ ./buildconf
$ ./configure --enable-dav --enable-so --enable-maintainer-mode --prefix=/usr/local/apache2
$ make && make install

2: Subversion

Cleanup (again)

First off, if you have any Subversion libraries lying around from previous 'make installs', clean them up first!

# rm -f /usr/local/lib/libsvn*
# rm -f /usr/local/lib/libapr*
# rm -f /usr/local/lib/libexpat*
# rm -f /usr/local/lib/libneon*

Get subversion

Find a place to download the sourcecode

$ wget http://subversion.tigris.org/downloads/subversion-1.4.2.tar.gz
$ wget http://subversion.tigris.org/downloads/subversion-deps-1.4.2.tar.gz
$ tar -zxvf subversion-1.4.2.tar.gz
$ tar -zxvf subversion-deps-1.4.2.tar.gz

Important: Ensure the same APR's

$ cd subversion-1.4.2
$ rm -rf apr*
$ svn co http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x apr
$ svn co http://svn.apache.org/repos/asf/apr/apr-util/branches/0.9.x apr-util

Autogen

Run:

sh ./autogen.sh

build, configure and install

At the top of the subversion tree: NOTICE: if you have changed the prefix, remember to change it below.

$ ./configure --enable-maintainer-mode --with-apxs=/usr/local/apache2/bin/apxs
$ make && make install

3: Adjust httpd.conf

cd /usr/local/apache2/conf
pico httpd.conf

Change port-number and server-name

At the buttom of httpd.conf setup the SVN paths:

<Location /repos>
    DAV svn
    SVNPath /path/to/repository/
#    SVNParentPath /path/to/parent repository/ # if you have different repositories under this path
</Location>

4: Launch the server

$ /usr/local/apache2/bin/apachectl start

Navigation

Personal Tools