How to configure SVN Server(Subversion )on CentOS/RHEL 5/6/7

Subversion is a version and revision control framework utilized by engineers to track and keep up prior version of their source codes. Subversion oversees file and directory, and the changes made to them, over time.This allow you to recover more established adaptations of your information, or analyze the historical backdrop of how your information changed.


In this article we can see how to configure Subversion Server on CentOS/RHEL.

Step 1: Install Apache Webserver

Before installing SVN packages, you must install Apache( Webserver ).Type the below command to install Apache along with dependencies.

# yum install httpd

In the wake of introducing Apache, begin Apache administration utilizing after charge and empower auto begin on framework reboot.

For CentOS/RHEL 5/6
# chkconfig httpd on
# service httpd start
For CentOS/RHEL 7
# systemctl enable httpd
# systemctl start httpd

Step 2: Disable Iptables and Selinux

If you not able to see the apache test page, disable the iptables and selinux service on your server. Use following steps to disable the service.

For CentOS/RHEL 5/6
# service iptables stop
# chkconfig iptables off
For CentOS/RHEL 7
# systemctl stop firewalld
# systemctl disable firewalld

Now disabled the selinux of server. After disable the selinux reboot the server.

# vim /etc/sysconfig/selinux
and replace with

Step 3: Install SVN Server

Once the Apache Web Server is installed, we’ll need to execute the following command to install subversion.

# yum install subversion mod_dav_svn

Check SVN Server Version

After installing the SVN Server check the version of SVN using following command.

# svn --version
svn, version 1.6.11 (r934486)
   compiled Feb 10 2015, 22:08:22

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

Step 4: Create Directory

Now create directory on server for SVN repositories.

# mkdir /var/www/svn/repos

Step 5: Configure SVN Server

After installing Apache Webserver we open or create the SVN configuration file and add the below lines in the file.

# vim /etc/httpd/conf.d/subversion.conf
<location /repos>
DAV svn
# SVN path
SVNParentPath /var/www/svn/repos
AuthType Basic
AuthName "Authorization Realm"
#password file path
AuthUserFile /var/www/svn/users
Require valid-user

Step 6: Create SVN Repository

Create a new repository and change the ownership of repository using following command:

# cd /var/www/svn/repos
# svnadmin create techoism
# chown -R apache.apache techoism

Step 7: Create New User

After creating a new repository we create a new user using following command.

# htpasswd -c /var/www/svn/users dennis

Note: If we have to add more using in the list then we use “-m” switch in place of “-c”

# htpasswd -m /var/www/svn/users steve

After creating user we will restart Apache Service.

For CentOS/RHEL 5/6
# chkconfig httpd on
# service httpd start
For CentOS/RHEL 7
# systemctl enable httpd
# systemctl start httpd

Now you should be start the svnserve process by using this script:

For CentOS/RHEL 5/6
# service svnserve start
For CentOS/RHEL 7
# systemctl start svnserve

Next, to set this script to run ‘start’ on server boot register the service:

For CentOS/RHEL 5/6
# chkconfig --add svnserve
# chkconfig svnserve on
For CentOS/RHEL 7
# systemctl enable svnserve

Step 8: Access Your Repository in Browser

Now open your svn repository in a browser. It will prompt for authentication.



Reference Articles:

How to Configure SVN Server with LDAP Authentication on CentOS/RHEL
How to Configure SVN Server on CentOS/RHEL

  1. 6 years ago

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.