Installing BerkeleyDB, Apache & Subversion on Debian 3 (woody)

Install Berkeley DB

  1. Go to http://www.sleepycat.com/download/index.shtml and download BerkeleyDB 4.2.52
  2. Download the patches numbered like this patch.4.2.52.?
  3. Extract the BerkeleyDB compressed file
  4. Copy all the patch files into the base directory just extracted
  5. Apply the patches individually using…patch -p0 < [patchfile]
  6. cd into the build_unix directory in the extracted directory
  7. Run…../dist/configure
  8. Run…make
  9. Ensure you’re logged in as root and run…make install (installs to /usr/local/BerkeleyDB.4.2)
  10. Add the line /usr/local/BerkeleyDB.4.2/lib to the file/etc/ld.so.conf
  11. Run ldconfig to update the library cache with the BerkeleyDB libraries

Install Apache

  1. 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
  2. Download tha latest version of Apache 2 from http://httpd.apache.org/download.cgi
  3. Extract the Apache compressed file
  4. cd in the extracted directory
  5. Run…./configure –enable-dav –enable-so –enable-ssl –with-dbm=db4 –with-berkeley-db=/usr/local/BerkeleyDB.4.2 –enable-deflate
  6. Run…make
  7. Ensure you’re logged in as root and run…make install (installs to /usr/local/apache2)
  8. Edit the file /usr/local/apache2/conf/httpd.conf and update the User & Group tags to www-data (Assuming of course that you have that user & group)

Install Subversion

  1. Download the latest version of Subversion from http://subversion.tigris.org/getting_subversion.html
  2. Extract the Subversion compressed file
  3. Run…./configure –with-ssl –with-berkeley-db=/usr/local/BerkeleyDB.4.2 –with-zlib
  4. Run…make
  5. Ensure you’re logged in as root and run…make install

Configure Apache & Subversion

  1. Create a directory to hold your repositories, something like /usr/local/svn
  2. Change the ownership on the directory to the www-user user (or whoever you set the User tag to in httpd.conf)
  3. Add users to Apache using this command…htpasswd -cm /etc/svn-auth-file <name>. Leave out the c switch if the file already exists
  4. 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

  1. 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.

2 thoughts on “Installing BerkeleyDB, Apache & Subversion on Debian 3 (woody)”

Leave a Reply