Posts Tagged ‘svnserve’

Subversion Server and Client Setup, Repository Initialization

Monday, January 21st, 2008

Abstract

This article will explain how to install subversion server and client utilities, how to setup a repository on the server and how to use this repository on a client. It will not delve deep into the workings on subversion, rather it is an administration manual. The instructions mentioned here are performed on openSuse 10.3, however they should be similar for other platforms.

Install Subversion

Subversion comes with openSuse 10.3, to install it fire up yast (yast2) and search for subversion in the software management.

Subversion packages selected for installation

After the packages are installed we need to configure the svnserve daemon to run as we want it.

I like to keep my repositories on the /home partition, so we will need to remove the default path for repositories, which svnserve provides by default. The config file is located at /etc/sysconfig/svnserve and after the changes it should look like the screenshot below.

Svnserve configured properly

Note how there is no default directory in the configuration file. The reason for this is I personally do not like to keep repositories on /srv/ because usually this is the root of the system and we could later have storage problems.

Create the user and group

Now, we need to create the svn group and svn user. This is done through yast security and users section. You will need to assign the user svn a default group svn, so that normal users will not have access to the repository directly and you can set permissions with more flexibility later (if needed). In the end you should have a user svn and a group svn. Please allow user login for the time being (do not put /bin/false as the shell). For example sake we will su to the svn user in the next section.

Create a sample repository

Now we can su to the user svn and navigate to his home directory and create some directory for our new repository. I have chosen to create sample_repository directory.

Navigate inside and type

svnadmin create .

This will create the repository and all the files that are needed to support it. The most important ones are in the conf directory. Open svnserve.conf and check the options. They should be pretty self explanatory,the most important part is to remove all spaces from the left side of the file, else the repository will not work. Below is the proposed sample configuration

Repository Based svnserve config

Next you need to configure access to the repository for specific users. This is done through the passwd file. The syntax is very basic. I have added a sample_user and my passwd file looks like this:

passwd file for the repository

After this the repository should be accessible from the client machine.

Client Setup

For the client the only options, that need to be setup are the url and the user name and password. The url in my case would be:

svn://IP/home/svn/sample_repository

For more information on setting up the client see the attached video or read the manual for a particular svn client (there are too many to discribe here).

svnserve video appleTV, xbox360

Windows Media Video format

Source .mov file (requires apple animation codec to play) - highest quality