2016-12-31

Installing a Subversion server on a (new) Raspberry Pi, Apache 2.4

Installing a Subversion (SVN) server on a Raspberry Pi used to be (relatively) straightforward (see Appendix A).

This worked without problems on an older Raspberry Pi earlier this year when I had the need to set up a test server for some heavy SVN operations (before unleashing them on the real SVN server at work).

However, repeating the same installation steps on a newer Raspberry Pi (model 3, with Wi-Fi) failed to get a working SVN server. Installing an SVN server in another place was a reasonable way to reset the server state such that adding of new files could be tested more than once (and not erasing the rich history on the old server) and also a way of testing the installation procedures should they be needed again in some other place and time.

Having the older server still working I had the luxury of being able to compare configuration files for Apache and SVN. However, nothing appeared to be incorrect.

One difference was that, by the same installation procedure, eight months apart, Apache 2.2 had been installed on the old server and Apache 2.4 on the new server. It later became clear that the way of configuration has changed significantly between Apache 2.2 and Apache 2.4.

Long story short, a symbolic link for enabling the SVN thing in Apache was not created (perhaps a bug in the installation scripts or change to defaults) in the new installation. Detection became:

ls -ls /etc/apache2/mods-enabled | grep svn

This was empty (symbolic link not present) on the new server, but on the old working server the output was:

There is (apparently) a standard mechanism for making these symbolic links by use of the script a2enmod and the fix/solution was:

sudo a2enmod dav_svnsudo service apache2 restart

Retrospectively, I found a Stack Overflow post, Configuring SVN server on Apache on Ubuntu 12.04, that had the exact solution. I had failed to locate it (one of the first steps was of course to search on Stack Exchange sites, primarily Stack Overflow, but also Super User and Server Fault).

Appendix A Installing an SVN server on a Raspberry Pi from scratch (with Apache for HTTP access)

These are command lines, done remotely over SSH using PuTTY on Windows.