How to configure SVN Server (Subversion Edge) on CentOS/Red Hat

Apache Subversion (often abbreviated SVN, after its command name svn) is a software versioning and revision control system distributed as open source under the Apache License. Software developers use Subversion to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly compatible successor to the widely used Concurrent Versions System (CVS).

In this tutorial, I am using CollabNet Subversion Edge. It simplify Apache Subversion installation, automate upgrades, and manage code, instances, and users in a centralized, simple way. You can add your preferred Subversion clients and pick from a range of integrations to further extend your Subversion platform.

You can download free CollabNet Subversion Edge from following link.

Use the following steps to install svn server in your linux system,

1. Install and configure jdk.

    Download jdk-version.tar.gz from


   Extract the downloaded jdk. 

                   # tar -xzf jdk-version.tar.gz

   Set environmental variable. 

                    Edit vim .bash_profile  --->  export PATH=(path of jdk bin):$PATH  (in centos,redhat....) 
           Edit vim .profile           --->  export PATH=(path of jdk bin):$PATH  (in ubuntu,mint....)

2. Create user svn.

[root@centos ~]# useradd svn

[root@centos ~]# passwd svn

3. Copy CollabNetSubversionEdge-5.1.5_linux-x86_64 to svn users home directory.

[root@centos ~]# cp CollabNetSubversionEdge-5.1.5_linux-x86_64.tar.gz  /home/svn/

4. Switch to svn user and add java environmental variable.

[root@centos ~]# su - svn

5. Open ".bash_profile" and add jdk path in it.

[svn@centos ~]$ vim .bash_profile

export PATH=/root/jdk1.8.0_112/bin/:$PATH

6. Extract package 

tar -xvf CollabNetSubversionEdge-5.1.5_linux-x86_64.tar.gz 

7. go to configuration folder and change csvn.conf.dist to csvn.conf

[svn@centos conf]$ cp -rp csvn.conf.dist  csvn.conf

8. Edit csvn.conf

Search for "JAVA_HOME" and uncomment this line and add jdk path. Change RUN_AS_USER=root

[svn@centos conf]$ vim csvn.conf

9. Go to bin directory and start svn.

[root@centos ~]# cd /home/svn/csvn/bin/
[root@centos bin]# ./csvn start

10. Install the application. 

[root@centos csvn]# sudo -E bin/csvn install

This installs the application so that it will run at startup. The script will swap to the user specified before it starts the console. Please note the JAVA_HOME requirement - you must have set the environment variable for your profile (or the entire system) so that it will be visible when the process starts.
When you install csvn as a service, you can control it with these commands:

    $ sudo service csvn status
    $ sudo service csvn start
    $ sudo service csvn stop

11. There are also scripts for Apache server, but you should visit the console first and go the Admin page to set the port and other options before you try to start it. It can also be started from the web UI.

[root@centos csvn]# bin/csvn-httpd start
[root@centos csvn]# sudo bin/csvn-httpd install

12.Test SVN Server.

The default username and password will be "admin"

No comments:

Powered by Blogger.