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
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
Once this is done extract and install like any other package
tar xxf subversion-1.7.1.tar.gz
cd subversion-1.7.1
make install
Now if our like me you plan to use Apache2 need to copy the modules to the appropriate dir
cp ./subversion/mod_dav_svn/.libs/ /usr/lib/apache2/modules/
cp ./subversion/mod_authz_svn/.libs/ /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
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
# Depends: dav
LoadModule dav_svn_module /usr/lib/apache2/modules/
LoadModule authz_svn_module /usr/lib/apache2/modules/
Now lets enable the module and restart apache
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
svnadmin --version
So its installed, but lets setup a quick and dirty test repo to confrim that apache is working
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
<Location /svn>
        DAV svn
        SVNPath /var/svn/test
Restart Apache then you should be good to go
/etc/init.d/apache2 restart
Now browse to http://your_server/svn and you should see a screen similar to the one below [caption id="attachment_173" align="aligncenter" width="503" caption="What you should see in your browser"][/caption] 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