Creato da pastuweb.com
Share My Page
My Social Accounts
Account FaceBook Account LinkedIn Account Twitter Account Google Plus Account Git Hub

This is a brief tutorial on how to setup a subversion (SVN) server on Ubuntu 12.04 (LTS).

To install the SVN server, run the following command in your Linux terminal:
$ sudo apt-get install subversion libapache2-svn apache2
 
Create a directory, where the subversion repository should be located (for example, chose /svn by)
$ sudo mkdir /svn
 
Then you have to configure the apache2 server to be compliant with subversion. This is done by adapting the dav_svn.conf file.  
It can be opened by following command:
$ sudo nano /etc/apache2/mods-enabled/dav_svn.conf
After opening, enter the following entries and save the file:
 
<Location /svn>
 
  DAV svn
  SVNParentPath /svn
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd
  Require valid-user
 
</Location>
 
Then, you can create the first svn-user account, based on following command
$ sudo htpasswd -cm /etc/apache2/dav_svn.passwd <ENTER_USER_NAME_HERE>
        Note: The -c option is only needed for the first user account, when you create a new user. For next users you only need to use the following command
    $  sudo htpasswd -m /etc/apache2/dav_svn.passwd <ENTER_USER_NAME_HERE>
As next step goto the /svn folder and create the subversion repository by
$ sudo svnadmin create <ENTER_NAME_OF_REPOSITORY>
Set the permissions of the /svn folder for apache by following command:
$ sudo chown -R www-data:www-data /svn
Restart the apache server with
$ sudo /etc/init.d/apache2 restart
Now you have setup your subversion repository on Ubuntu 12.04. 
You can now checkout the revision zero of your subversion repository by:
$ svn checkout http://127.0.0.1/svn/<ENTER_NAME_OF_REPOSITORY>
Average (1 Vote)
The average rating is 5.0 stars out of 5.