Linux Version Control System (VSC)

How to Install Apache Subversion on a Linux System


Apache Subversion(SVN) is a free and open-source version control system that saves earlier versions of your files and folders and modifications to them. This will allow you to retrieve older versions of files if necessary. You may also track the repository and see who made what improvements. Subversion and Git are quite similar, with the main distinction being that Git is a distributed version control system, whereas SVN is a centralized version control system. Subversion provides a single central repository, which makes it easier to maintain a top-down control strategy. This article will teach you how to install SVN on a Linux machine, Other similar guides are here: How to install Rust in a Linux System and How to fix unable to access microphone on Zoom and How to install Gradle on Ubuntu and How to modify Windows 11 Taskbar via Intune and GPO an upgrade from Ubuntu 20.04 LTS to 22.04 LTS.


  • A Ubuntu operating system
  • A user account with sudo privileges

Step1: Update your packages

Run the following command to update your base system with the latest available packages.

apt update 
apt update

Step2: Install Apache Subversion

Apache webserver must be installed on your server before proceeding. If it is not already installed, use the following command to do so:

apt-get install apache2 apache2-utils -y
svn utils

Once the installation is complete, run the following command to install Subversion:

sudo apt-get install subversion libapache2-mod-svn subversion-tools libsvn-de


You must activate some SVN modules after installing Apache Subversion. You can use the following command to enable them:

a2enmod dav
a2enmod dav_svn
a2enmod authz_svn

The modules have been enabled from step 1 as we can see from the image below. But try to run them just like I did just to ensure


After you’ve enabled all of the modules, restart the Apache service to apply the changes:

systemctl restart apache2

Apache Subversion has now been installed and we can verify it using systemctl status apache2. You can now start working on your first repository.


You can confirm this further by typing your local IP Address on the browser you can get your IP by typing IP add show in terminal


Step3: Create a Subversion Repository

To begin with, create a directory for Subversion using this command:

sudo mkdir /opt/svn

Next, create a repository named techdirecarchive inside the /svn directory you can choose to call your repo any name :

sudo svnadmin create /opt/svn/techdirectarchive

Once the repository is created, change the ownership of the repository to www-data:

sudo chown -R www-data:www-data /opt/svn/techdirectarchive
 sudo chmod -R 775 /opt/svn/techdirectarchive
change ownership & permission

Afterward, use the following command to create a new Subversion user:

htpasswd -cm /etc/svn-user raphael

Enter the password you want to use, as indicated below:

New password:
Re-type new password:
Adding password for user raphael
user & password

Step 4: Configure Apache for Subversion

To use Apache Subversion with a web browser, you must first set up an Apache virtual host file.

You can create it with the following command:

 sudo vim /etc/apache2/mods-enabled/dav_svn.conf
configuration file

Uncomment the following lines:

DAV svn

SVNParentPath /var/www/svn

AuthType Basic

AuthName “Subversion Repository”

AuthUserFile /etc/apache2/dav_svn.passwd

Require valid-user

When you’re finished, save and close the file. The Apache service should then be restarted to apply the changes:

systemctl restart apache2

Step 5 : Access Apache Subversion

Open a web browser and navigate to http://ipaddress/svn/techdirectarchive. Please visit the following page:

If you followed along, congratulations you have successfully installed Apache subversion.

svn admin page


We can install and figure apache subversion by following a series of steps as shown above.

Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x