Pages

Subscribe:

Ads 468x60px

Monday, October 6, 2014

How to Install and Configure Subversion Server with HTTP Access

Hi all, Recently I came across with the $subject and I was unable to find a comprehensive tutorial. So In this post I've decided to show how to install and configure apache subversion server and configure the server to access via http in ubuntu.

First of all update the apt-get by the following command.
sudo apt-get update

Then Install the subversion and it's utilities.
sudo apt-get install subversion subversion-tools libapache2-svn

Create two directories svn and repository in your home directory.
mkdir /home/ubuntu/svn 
mkdir /home/ubuntu/repository

Next step is to create the svn repository.
sudo svnadmin create /home/ubuntu/svn/repo

Create some folders inside the repository directory.
cd /home/ubuntu/repository 
mkdir tags branches trunk

Execute the svn import command to import repository.
sudo svn import /home/ubuntu/repository file:///home/ubuntu/svn/repo

Install apache2 server from the following command.
sudo apt-get install apache2

Enable dav_svn apache module
sudo a2enmod dav_svn

Open up the apache2.conf file
sudo vi /etc/apache2/apache2.conf

Add the following to the end of the file.
<Location /svn>
    DAV svn
    SVNParentPath /home/ubuntu/svn
</Location>

Open up the svnserve.conf file
sudo vi /home/ubuntu/svn/repo/conf/svnserve.conf

Add the following content to the file
anon-access = none
auth-access = write
password-db = passwd

Open up the passwd file.
sudo vi /home/ubuntu/svn/repo/conf/passwd

Add a user to the passwd file, I'll add username:password as aruna:aruna
aruna = aruna

Restart the apache server
sudo service apache2 restart

Access your svn server using the following url.
http://localhost/svn/repo

That's it folks, Now you have your own svn server.. :)

No comments:

Post a Comment