Subversion is an open source version control system which manages files and directories, and the changes made to them, over time. In software development environments, subversion is a tool that that fosters collaboration between programmers.
Before installing the subversion server, ensure that the Apache2 web server has been installed and properly configured. Instructions on how to do this is found here:
To install and configure a subversion server on Ubuntu Server 11.10, follow these steps:
Download and install Subversion
The libapache2-svn module is required for accessing the subversion repository using the http protocol.
Create the subversion group
Add yourself and the Apache user (www-data) as users to the subversion group.
Create a folder to store the subversion repository
Create the project folder and repository (e.g. if we wish to import the php project folder):
Grant web server and subversion members access
Configure Apache to access subversion
$ sudo nano /etc/apache2/mods-available/dav_svn.conf
SVNParentPath and SVNListParentPath enable the ability to browse all projects on the repository. For added security, consider installing the SSL module for Apache to encrypt authentication data. Require valid-user means that authentication is required to access the subversion repository.
Define a new user for accessing subversion
Important: The -c switch should only be use for entry of the first user.
To add more users after that, use (without the -c switch):
Restart the Apache web server
Import a test project files
We are going to import a test project from the /var/www/php folder, and assumes that the subversion server and project file are co-located (i.e. on the same server). Create some php files in there if you don’t have any.
To confirm the project files have been imported
You should see the same set of files that are in the project folder you have imported.
That’s all! You’ve successfully setup a Subversion server on Ubuntu Server 11.10 and imported your first project.