Over a million developers have joined DZone.

How to Install and Configure Subversion Server with HTTP Access

Build APIs from SQL and NoSQL or Salesforce data sources in seconds. Read the Creating REST APIs white paper, brought to you in partnership with CA Technologies.

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.

The Integration Zone is brought to you in partnership with CA Technologies.  Use CA Live API Creator to quickly create complete application backends, with secure APIs and robust application logic, in an easy to use interface.

Topics:

Published at DZone with permission of Aruna Karunarathna, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}