Subversion 1.7 Debian
Update: Confirmed that this process works on svn 1.7.3 and 1.7.4, Works well on Debian Lenny (5.0) so if you have problems and your running Etch (4.0) or older please try and upgrade
At the time of writing Subversion 1.7.x wasn’t in the Debian Apt tree, and as i wanted to use the new HTTPv2 access method i decided to try my hand at building it from source.
I started with a bare bones Debian 6.0.3 box, the only non standard package i installed was ssh.
First off lets let apt-get do all the hard work when it comes to solving the dependencies for building SVN 1.7, we also may as well install Apache2 at this point. I have also added vim as its my text editor of choice for CLI
1 2 3 | apt-get update apt-get build-dep subversion subversion-tools libapache2-svn apt-get install apache2 vim |
Be warned, for me i needed 477 (432mb) packages to this may take awhile to get and install
From here, lets use wget to grab the latest source package, the latest version should aways be listed on the Source Downloads on the Subversion website. at time of writing this is 1.7.1
1 | wget http://apache.mirror.aussiehq.net.au/subversion/subversion-1.7.1.tar.gz |
Once this is done extract and install like any other package
1 2 3 4 5 | tar xxf subversion-1.7.1.tar.gz cd subversion-1.7.1 ./configure make make install |
Now if our like me you plan to use Apache2 need to copy the modules to the appropriate dir
1 2 | cp ./subversion/mod_dav_svn/.libs/mod_dav_svn.so /usr/lib/apache2/modules/ cp ./subversion/mod_authz_svn/.libs/mod_authz_svn.so /usr/lib/apache2/modules/ |
Now to build a few config files, i prefer vim for my CLI text editing so i’m going to install it now, feel free to
1 2 | touch /etc/apache2/mods-available/dav_svn.conf vim /etc/apache2/mods-available/dav_svn.load |
Simple config just copy and paste the text below
1 2 3 | # Depends: dav LoadModule dav_svn_module /usr/lib/apache2/modules/mod_dav_svn.so LoadModule authz_svn_module /usr/lib/apache2/modules/mod_authz_svn.so |
Now lets enable the module and restart apache
1 2 | a2enmod dav_svn /etc/init.d/apache2 restart |
If you don’t get any errors, Chances everything is installed and configured correctly, you can always use the –version switch on svn or svnadmin to confrim
1 | svnadmin --version |
So its installed, but lets setup a quick and dirty test repo to confrim that apache is working
1 2 3 4 | mkdir /var/svn/ svnadmin create /var/svn/test chown -R www-data:www-data /var/svn/test/ vim /etc/apache2/conf.d/svn_test |
Config for /etc/apache2/conf.d/svn_test
1 2 3 4 | <Location /svn> DAV svn SVNPath /var/svn/test </Location> |
Restart Apache then you should be good to go
1 | /etc/init.d/apache2 restart |
Now browse to http://your_server/svn and you should see a screen similar to the one below
From here you have the worlds most basic SVN server setup, no restrictions or limitations but if your just installing something on your local pc/network this may be enough for you, I plan to follow this up with a post about how i migrated 200gb 300,000+ revision corporate repo from my old 1.6.x server to my new 1.7.1 server

Pingback: Subversion 1.6 on Debian Lenny - swherdman.com
Pingback: Subversion 1.7.x « Debian-World.Com