Linux [ServerSupport]

Configure Version Control Server with SVN (Subversion) Over Apache - Linux

Required Packages

  • subversion neon neon-devel mad_dav_svn
  • check for shown packages installed.
    # yum list subversion neon neon-devel mad_dav_svn
    Installed Packages
    neon.i386           0.25.5-5.1     installed
    subversion.i386     1.4.2-2.el5    installed
    Available Packages
    mod_dav_svn.i386    1.6.11-7.el5      base
    neon.i386           0.25.5-10.el5_4.1 base
    neon-devel.i386     0.25.5-10.el5_4.1 base
    subversion.i386     1.6.11-7.el5       base
  • # yum install mod_dav_svn
  • Once the required package installed can continue with next steps.

Starting Apache(HTTPd) service (Changing port if Required)

   Before we setup the svn, first we need to do is, to start the apache service. To do this edit the file“/etc/httpd/conf/httpd.conf”.  

Go to line no 134 and changeListen 80 to Listen 8021 (or) required port no. If required, you can change. Or just you can start the HTTP service.
Now Save and exit.
Start the HTTPd service
# sudo /sbing/service httpd start


# sudo /sbin/checkconfig httpd on


Configure subversion's apache

[root@testpc9~]# cd /etc/httpd/conf.d/
[root@testpc9~]# vim sumbversion.conf


now save the file and exit.
Next we need to create password file for httpd service.

Creating a password file using htpasswd for httpd service

[root@testpc9~]# htpasswd -c /etc/httpd/conf.d/proj1repo.passwd <user1>


  • To add more then one users.

[root@testpc9~]# htpasswd /etc/httpd/conf.d/proj1repo.passwd <user2>


Configure the Required Repository

Next thing we need to create a required repository for check in/out/add/ etc.
[root@testpc9~]# cd /svnrepo (wherever you placed the path which is mentioned in above)
[root@testpc9 svnrepo]# svnadmin create proj1repo


If all went well as above, then your are ready to use svn repository.
[root@testpc9~]# svn --help
The most common arguments you will most likely be using are: svn import, svn commit (ci), and svn checkout (co). With these you will initially import files into your repository with import, you'll check them out to work on them with checkout, and you'll commit the changes back into the database with commit. It's pretty simple once you see them in use a few times.


Linux [Client Support]

SVN Client Setup over Apache on Linux

The below step will be in Command mode to access the svn repository

Checking out empty repository at the client end.

See How to setup OpenVpn Client in Windows


Add and Commit New folder and files in the repository folder.




SVN Client Setup over Apache on Windows

First download the svn client for windows. Download and install on your pc.

Accessing repository using SVN Client.

Go to a folder where you want to download the repository. In below picture I'm using temp folder.


Now right click in temp folder and go to trotisesvn option, their you can see repo browser. Click on repo browser.


You will be asked to enter url in url window. Enter the url and click on ok. After this you will be asked to Enter Username & Password. As shown in below picture.



Once you enter the Username and password you will be displayed with a window shown in the below picthure.


To Check Out the data from repository follow the same steps

  • First go to required folder in your local PC.
  • Right click the mouse button, then go to SVN Checkout


Click ok, before check the repository path and path you want to download.


Enter username and password, click OK. Shown above. You will be displayed download success window as shown below. Now click OK. And go to your folder where you had selected for downloading from a repository.


Now go to your folder where you had selected for downloading of repository.


Steps to Add & Commit from windows.








Better to add the message before click ok.





Creating Multiple SVN Repo over Apache

Configuring Subversion Repository for Multiple Repo.

  • [root@test9pc conf.d]# vim subversion.conf
  • Now copy last 11 lines and append to the file as shown in below image. Edit the repository name and the path and change password file name.


  • To create the password file follow the same steps shown in 6.1.d
    [root@testpc9~]# htpasswd -c /etc/httpd/conf.d/proj2repo.passwd <user1>
    → To add more then one users.
    [root@testpc9~]# htpasswd /etc/httpd/conf.d/proj2repo.passwd <user2>

After creating the repository rest of the steps is same.

Configuring Second Repository proj2repo..