Main Subversion Wiki page is SVN

NatNet servers run apache 1.3.x, so we can't use the svn apache2 modules for network access. We fall back to the svnserve daemon. Once more, with feeling, the apache modules (mod_dav_svn) that ship with subversion will only work with apache2, and so we only support svnserve, which is in the subversion-tools package in Debian.


Svnserve is a pretty straightforward daemon with only a few options. Run it with -h to see the list. Here are the important ones:

-d --daemon : daemon mode --foreground : run in foreground (useful for debugging) -r --root arg : root of directory to serve -R --read-only : force read only, overriding repository config file

With these options and the configuration files in the repositories themselves, svnserve has network access and basic auth. Optionally WebSVN ( ) can be used for a web front-end.

Set it up

apt-get update && apt-get install subversion subversion-tools

(If you're not on Debian, yum it, then cry and see upstream docs for compile help as svn has several build dependencies including apache's apr, neon, and of course openssl)

Create svn user: adduser --disabled-login or just put a * in the password field in /etc/shadow after. Creates home /web/sites/svn

Create repository in ~svn svnadmin create /full/path/to/goat chown -R svn:www-data goat #to avoid permissions trouble.

In the repository edit/replace conf/svnserve.conf with:

general anon-access

none auth-access

write password-db = /etc/svnpasswd

And add users to /etc/svnpasswd like this:

users username = password

And don't forget to chown -R'' the repository(ies) back to ''svn:www-data when you're done configuring it.

You can also have groups, see the book. We should probably use a realm for any multiuser setups so that we can have them share the passwd file. In this configuration we are not using authz which allows for more fine-grained access control (groups, acls).


Although you can just add svnserve -i -d -r /web/sites/svn to xinetd, you can also use an init script for svnserve to run on boot. You can derive a full one from /etc/init.d/skeleton or Majied has used a much, much simpler version which starts svnserve but obviously won't stop or restart it:
#!/bin/bash ## /etc/init.d/svnserve - start svn on boot su svn -c 'svnserve -d -r /web/sites/svn/'

Add either to startup with update-rc.d svnserve defaults and start it up. Here's the exact inetd line: svn stream tcp nowait www-data /usr/bin/svnserve svnserve --inetd --root /web/sites/svn


Test with:
svn ls svn://localhost/reponame #Should return nothing with no errors

Be sure to update any firewall rules to allow access to the server. Subversion is TCP port 3690.


WebSVN (1.61 from SVN : svn export websvn ) works. As per the install.txt cp the includes/ to includes/ to activate the default configuration.

Comment out this line in to get rid of a gzip and permissions (?) error:

// Comment this line to turn off caching of repo information. //$config->setCachingOn();