LinuxTutorialsUbuntu

How To Install Apache SVN on Ubuntu 14.04

Install Apache SVN on Ubuntu 14.04

In this tutorial, we will show you how to install Apache SVN on Ubuntu 14.04. For those of you who didn’t know, Apache Subversion which is commonly referred to in its abbreviated form as SVN, (named after the command name svn) is a popular software versioning and revision control system which is distributed as free software under the Apache License. Mainly used by developers to maintain present and historic file versions like documentation, source code, and web pages, it primarily aims to be a compatible successor to the extensively used CVS (Concurrent Versions System).

SVN supports several protocols for network access: SVN, SVN+SSH, HTTP, and HTTPS. If you are behind a firewall, HTTP-based Subversion is advantageous since SVN traffic will go through the firewall without any additional firewall ruleset. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you the step-by-step installation of Apache SVN on the Ubuntu 14.04 server.

Prerequisites

  • A server running one of the following operating systems: Ubuntu 14.04, and any other Debian-based distribution.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Apache SVN on Ubuntu 14.04

Step 1. First, you need to update the repositories using the following command.

sudo apt-get update

Step 2. Install SVN and apache webserver.

sudo apt-get install subversion apache2 libapache2-svn apache2-utils

Step 3. Create and configure the SVN repository.

mkdir -p /svn/repos/
cd /svn/repos/
svnadmin create testrepo
chown -R www-data:www-data /testrepo

Step 4. Configure Subversion with Apache.

Once installing the package, you must open the subversion httpd config file.

#nano /etc/apache2/mods-enabled/dav_svn.conf

## Uncomment following lines ##

<Location /svn>
DAV svn
SVNParentPath /svn/repos/
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/subversion/passwd
Require valid-user
</Location>

Step 5. Create an account and password for SVN.

The following commands will add two users for svn. It will prompt for users’ passwords to be assigned.

htpasswd -cm /etc/svn-users idroot
htpasswd -m /etc/svn-users idroid

Step 6. Restart Apache2 Server.

etc/init.d/apache2 restart

Step 7.Accessing Apache Subversion.

Finally, You can visit the URL http://your-ip-address/svn/testrepo to check out the content, you will be asked to enter the user name and password.

Congratulations! You have successfully installed Apache SVN. Thanks for using this tutorial for installing the Apache Subversion server on Ubuntu 14.04 system. For additional help or useful information, we recommend you check the official Apache Subversion website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer” installation, starting from $10 (Paypal payment). Please contact us to get the best deal!

Save

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button