How to install and configure SVN on Ubuntu

Subversion – another name we known as SVN, is an open source version control system. SVN is a really easy to use Revision control/version control/source control and store changes of your project files such as coding and documentation.

In this tutorial we will discuss how to install subversion on Ubuntu 14.04.

Follow the below mentioned commands to install SVN packages

Create a new directory where you would like to store svn files

Permission modification for the repository

Create a new repository with the command below

You will have to change ownership each time you create a repo

We will confirm that apache2-utils is installed which we would be needing for command below (htpasswd)

To store user authentication details, create a file as shown below (/etc/subversion/users_passwd)

Here users_passwd is the filename and USERNAME is the username for accessing repository.

For additional users have to omit -c onwards.

Create /etc/apache2/sites-available/svn.conf file and add the below lines.

Now we will activate the virtual host configuration

Restart apache service now.

Create file /etc/subversion/users_repo_authz

REPOSITORY_NAME is the name of the repo and after colon you can also restrict user to repo directory also by adding following line

We will restart apache to take effect of users_repo_authz file changes. Otherwise you will get permisison denied message.

Now you have successfully installed and configured SVN server on ubuntu 14.04.

We suggest to use svn clients such as Tortoisesvn for windows and Rapidsvn for Ubuntu. For a quick testing, Open any folder right click and Tortoisesvn checkout will appear. You can place url   http://HOSTNAME/repos/REPO_NAME in the box and after successful authentication you can checkout, update, commit code in that folder.