SVN Server

SVN is a centralized version control system similar to CVS, but based on the concept of change-sets instead.

Now many “flavors” of Unix/Linux available, for each individual distribution, there are other different ways to get up and running with your own Subversion Server.
Debian or Ubuntu
> apt-get install subversion

Via pkg-get:
> pkg-get install subversion

Via Zypper:
> zypper install subversion

Via YaST:
> yast2 -i subversion

> sudo pkg_add subversion

Fedora or CentOS
> yum install subversion

No Package Manager. Simply:
> cd /usr/ports/devel/subversion;
> make install

2. Make and Configure first Subversion Repository(Path)

]$mkdir -p /home/<username>/svn/repository

]$cd /home/<username>/svn/repository

]$svnadmin create svnproject

Now we need to edit “svnserve.conf” file which is in  “/home/<username>/svn/repository/myfirstproject/conf/svnserve.conf”.

Now we will see a heavily ### commented file. The lines with the single “#” comment marks are the ones we need to edit. You’ll want to remove the comments (#) and customize these settings to suit your project’s needs. Here are what the main directives in this file mean:

*password-db – this is the name of a text file that stores the usernames and passwords of authorized users for your repository.

*realm – realm tells clients what they are connecting to. It’s recommended you customize this to something like “<Project Name> Subversion Repository.” But you can of course choose any name you wish.

*anon-access – this directive indicates what anonymous users are allowed to do with your repository. The three valid values are none, read, and write. As you would expect, none allows anonymous users to neither read nor write to your repository; read grants read-only access, and write (not recommended) allows for both read and write permissions.

*auth-access – determines what permission level authorized users will have. In almost every case this will be set to write. Again, the three valid options are none, read, and write.

Once you’ve saved your customized svnserve.conf, you’ll need to open or create your password-db file. In this example we’ve just used the included passwd file located in the conf directory. Open that file, and you’ll see something like the following:


# abc = 123

# xyz = abc

Here we can add users and their passwords.

Next we’ll need to change the permissions on the Repository directory so that svnserve is permitted to make changes to the files stored there:

]$sudo chown -R root:admin /home/<username>/svn/repository

]$sudo chmod -R ug+rwX,o= /home/<username>/svn/repository

After completing this, it’s time to fire up the svnserve Subversion Server daemon

]$svnserve -d -r /home/<username>/svn/repository

4. Testing Subversion Server Configuration

]$cd ~> mkdir projects

]$cd projects>

]$svn checkout svn://localhost/myfirstproject

]$cd svnproject

]$svn mkdir branches tags trunk

]$touch trunk/test.txt

]$svn add trunk/test.txt

]$svn commit -m “Initial Import”

If your commit was successful, you should see some output like this:

Adding branches

Adding tagsAdding trunk

Adding trunk/test.txtCommitted revision 1.

Now we have successfully installed, configured, and worked with our first svn project hosted on our own Subversion Server.  .;)



Thanks for visiting this site…………………..Welcome Genowin Technologies.

Happy To Help You ….
All Linux Solution & Training.
Genowin Technologies(

Leave a Reply

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