Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Install and Configure Subversion Server with HTTP Access

DZone's Guide to

How to Install and Configure Subversion Server with HTTP Access

Free Resource

Modernize your application architectures with microservices and APIs with best practices from this free virtual summit series. 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 proudly sponsored by CA Technologies. Learn from expert microservices and API presentations at the Modernizing Application Architectures Virtual Summit Series.

Topics:

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

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}