Installing Subversion on Ubuntu
We all know how important it is to use version control even if you are working alone on a personal project at home. In this tutorial I will take you through installing Subversion on Ubuntu.
Installing Subversion on Ubuntu is extremely easy. To begin, enter the following at the terminal to update to the latest repositories:
sudo apt-get update
To start the installation enter the following at the terminal:
sudo apt-get install subversion
The first thing you need to do is to create a central repository where your files can be stored. I chose /home/svn. We will use the svnadmin tool which will create the path and also set up the repository:
sudo svnadmin create /home/svn
Next we need to create a group in order to enable access to the Subversion repository. Enter the following command at the terminal to create a group named ’svn’:
sudo addgroup svn
Now you can add yourself to this group:
sudo adduser your_username svn
You will also need to do this for every other user who will need access to the repository. After you have added yourself to the group, you will need to log out and log back in to ensure that you are registered as a member of the newly created group.
To enable access for the svn group to the repository we need to change the group and also set the permissions:
sudo chgrp -R svn /home/svn
sudo chmod -R g+rws /home/svn
And that’s it. You can now set up Subversion with your IDE or any other Subversion client. The repository can be located or accessed at the following two locations:
file:///home/svn
file://localhost/home/svn
You can test it by entering the following at the terminal:
svn info file:///home/svn
This should display some information about the repository.
Also note that this method will only allow local access. If you want to share the repository over a network, you will need to install Apache or some other server to expose the repository directory.
Possibly related entries:
Exposing Subversion through Apache
Installing Apache on Ubuntu
Setting up Subversion in IntelliJ IDEA
[…] we start, you might want to check out: Installing Subversion on Ubuntu Installing Apache on […]