Live Chat Software by NetForChoice
How to configure SVN Server(Subversion) on CentOS/RHEL 5/6/7
Posted by on 29 March 2016 02:04 PM

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, overtime. This allow you to recover more established adaptations of your information, or analyze the historical backdrop of how your information changed.




Step 1: Install Apache Webserver                                       

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

# yum install httpd

For CentOS/RHEL 5/6

# chkconfig httpd on

# service httpd start  or  # /etc/init.d/httpd start

For CentOS/RHEL 7

# systemctl enable httpd

# systemctl start httpd

Step 2: Disable Iptables and Selinux

Note: if you not able to see the apache test page, disable the iptables and selinux service on your server. Use following steps to disables 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

Bydefault SELINUX=enforcing

And replace with SELINUX=disabled


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_dev_svn

Check SVN Server Version

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

# svn  --version

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 line 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 kush

# chown –R apache.apache kush

Step 7: Create New User

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

# htpasswd –c /var/www/svn/users khushal

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

# htpasswd –c /var/www/svn/users shiv

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 time.

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.



(2 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
Help Desk Support from NetForChoice