How to: Set up a Subversion Repository
January 8, 2012
This is a simple guide to setting up a Subversion repository on a Debian server. Although I prefer using Git for version control, my partner in a project wanted to use Subversion, so I had to research a little, and here is the summary.
Install Subversion
Make sure that Subversion is installed.
which svn which svnadmin
If they are not available, install the packages with
apt-get update apt-get install subversion
Create a Repository
Create a folder for the repository and register.
mkdir /var/svn-repos/ svnadmin create --fs-type fsfs /var/svn-repos/[repository name]
Permissions
groupadd svn-users addgroup username1 svn-users addgroup username2 svn-users chown -R root:svn-users /var/svn-repos/ chmod -R 770 /var/svn-repos/
Test
svn info svn+ssh://username@example.com/var/svn-repos/[repository name]
