Installing BerkeleyDB, Apache & Subversion on Debian 3 (woody)
Install Berkeley DB
- Go to http://www.sleepycat.com/download/index.shtml and download BerkeleyDB 4.2.52
- Download the patches numbered like this
patch.4.2.52.?
- Extract the BerkeleyDB compressed file
- Copy all the patch files into the base directory just extracted
- Apply the patches individually using…
patch -p0 < [patchfile]
- cd into the
build_unix
directory in the extracted directory - Run…
../dist/configure
- Run…
make
- Ensure you’re logged in as root and run…
make install
(installs to /usr/local/BerkeleyDB.4.2) - Add the line
/usr/local/BerkeleyDB.4.2/lib
to the file/etc/ld.so.conf
- Run
ldconfig
to update the library cache with the BerkeleyDB libraries
Install Apache
- Ensure that the following packages are installed. If they’re not just do an
apt-get install
to download and install them…autoconf libtool openssl libssl-dev zlib1g zlib1g-dev
- Download tha latest version of Apache 2 from http://httpd.apache.org/download.cgi
- Extract the Apache compressed file
- cd in the extracted directory
- Run…
./configure -enable-dav -enable-so -enable-ssl -with-dbm=db4 -with-berkeley-db=/usr/local/BerkeleyDB.4.2 -enable-deflate
- Run…
make
- Ensure you’re logged in as root and run…
make install
(installs to /usr/local/apache2) - Edit the file
/usr/local/apache2/conf/httpd.conf
and update theUser
&Group
tags towww-data
(Assuming of course that you have that user & group)
Install Subversion
- Download the latest version of Subversion from http://subversion.tigris.org/getting_subversion.html
- Extract the Subversion compressed file
- Run…
./configure -with-ssl -with-berkeley-db=/usr/local/BerkeleyDB.4.2 -with-zlib
- Run…
make
- Ensure you’re logged in as root and run…
make install
Configure Apache & Subversion
- Create a directory to hold your repositories, something like
/usr/local/svn
- Change the ownership on the directory to the
www-user
user (or whoever you set the User tag to in httpd.conf) - Add users to Apache using this command…
htpasswd -cm /etc/svn-auth-file <name>
. Leave out thec
switch if the file already exists - Add the following section to
/usr/local/apache2/conf/httpd.conf
LoadModule dav_svn_module modules/mod_dav_svn.so DeflateFilterNote Input instream DeflateFilterNote Output outstream DeflateFilterNote Ratio ratio LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate CustomLog logs/deflate_log deflate <Location /svn> DAV svn SVNParentPath /usr/local/svn AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/svn-auth-file Require valid-user SetOutputFilter DEFLATE SetInputFilter DEFLATE </Location>
These config entries will password protect your repositry and allow for data sent between clients and Apache to be compressed.
Starting Apache
- Ensure you’re logged in as root and run…
/usr/local/apache2/bin/apachectl start
The next step is to try and get Apache using SSL because Basic authentication uses plain text when transmitting the password from the client to the server. This article seems to do the trick.