Install SVN Server on Fedora 23/22, CentOS/RHEL 7.2/6.7/5.11

This is guide, howto install SVN (Subversion) server on Fedora 23/22/21/20/19/18, CentOS 7.2/6.7/5.11, Red Hat (RHEL) 7.2/6.7/5.11.

What is SVN (Subversion)?

Subversion is a free/open-source version control system. Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data, or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of “time machine”.

Install SVN (Subversion) Server on Fedora 23/22/21/20/19/18, CentOS 7.2/6.7/5.11, Red Hat (RHEL) 7.2/6.7/5.11

1. Change root user

2. Install needed packages (mod_dav_svn and subversion)

Fedora 23/22

Fedora 21/20/19/18 and CentOS / Red Hat (RHEL) 7.2/6.7/5.11

Note: If you don’t have Apache installed already, this command installs it also. Read more about installing and configuring Apache and PHP >>

3. Modify / Create Subversion config file /etc/httpd/conf.d/subversion.conf

Add following config to /etc/httpd/conf.d/subversion.conf file:

Fedora 23/22/21/20/19/18 and CentOS/Red Hat (RHEL) 7.2

LoadModule commands should be in /etc/httpd/conf.modules.d/10-subversion.conf file:

Read more SVN Access Control >>

CentOS/Red Hat (RHEL) 6.7/5.11

Read more SVN Access Control >>

4. Add SVN (Subversion) users

Use following command:

Note: Use exactly same file and path name as used on subversion.conf file. This example use /etc/svn-auth-users file.

Read more SVN Access Control >>

5. Create and configure SVN repository

Restart Apache:

Goto http://localhost/svn/testrepo address and you should see something like following, write username and password:
SVN Subversion username and password

SVN testrepo revision 0:
SVN Subversion Repository Revision 0

6. Configure repository

To disable anonymous access and enable access control add following rows to testrepo/conf/svnserve.conf file:

7. Create trunk, branches and tags structure under testrepo

Create “template” directories with following command:

Then import template to project repository using “svn import” command:

Check results on browser and see testrepo revision 1:
SVN Subversion Repository Revision 1

Read more about SVN (Subversion) Access Control with Apache and mod_authz_svn.

Remember also take regular backups. Here is guide howto backup and restore SVN (Subversion) Repositories.

Share this post


  1. i resolved it thanks but im not able to commit the files…

  2. Hello sir,

    Thanks.Ur tutorial is awesome, but can u pls add how to access the svn with LDAP users,.(Means needs to be integrate svn with LDAP)



Submit a Comment

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