Creating a new SVN Repository

Let’s assume we want to create an SVN repository for our project “Apollo”

1. Create the directory in the SVN base folder

mkdir /home/svn/apollo

2. Create the SVN repository

svnadmin create /home/svn/apollo

3. Add HTTP Access to the repository

Edit your Apache configuration file and add the following to your VirtualHost

DAV svn
SVNPath /home/svn/apollo
AuthType Basic
AuthName "Apollo SVN Repository"
AuthUserFile /etc/subversion/passwd
Require valid-user

4. You also need to set the permissions for your repository folder so that the Apache user can read/write to this directory.

chown -R www-data:www-data /home/svn/apollo

5. Restart apache

service apache2 restart

That’s all you need to add a new repository to your SVN Server.