This post explains how to install a SVN server through svnserve xinetd service. It is installed from RPM packeges using URPMI on a Mandrake system.
First install all necessary packages. You will need the following ones:
# urpmi subversion
# urpmi subversion-tools
# urpmi subversion-server
After subversion-server gets installed you will see your xinetd is restarted. That’s because SVN is installed as an xinetd service.
2. Configure the System
You need to examine the following file in order to make changes to the config:
# vi /etc/xinetd.d/svnserve
By default the SVN server is disabled. In order to enable it change the following line:
disable = yes to: disable = no
Now restart the xinetd service:
# service xinetd restart
Now you should see your SVN server to be listening on port 3690:
# netstat -a | grep svn tcp 0 0 *:svn *:* LISTEN
OK, we are good now but not enough. We need to get rid of all the firewalls and filters which prevent us to connect to our SVN server from the outside.
If you use shorewall as your firewall, edit the following file:
# vi /etc/shorewall/rules
and add the following two lines:
ACCEPT net fw tcp 3690 - ACCEPT net fw udp 3690 -
# service shorewall restart
Next allow connection to your SVN server from xinetd:
# vi /etc/hosts.allow
Add the following:
OK, now you are ready to connect to your SVN server from outside.
3. Configure SVN Server
Your repositories are probably stored in the following directory:
You can connect to the server using the following command:
$ svn checkout svn://yoursite.com/repo1
where repo1 is the name of your repository and yoursite.com is name of your host.
You might be wondering how to create a repository. It is easy:
# svnadmin create repo1
A directory will be created with a specific structure under:
The most important directory is conf. Edit the file svnserve.conf to configure your repository:
# vi /var/lib/svn/repositories/repo1/conf/svnserve.conf
anon-access = none auth-access = write password-db = passwd authz-db = authz realm = My First Repository
Next edit the plaintext password file (low security):
# vi /var/lib/svn/repositories/repo1/conf/passwd
[users] user = userpassword
OK, now you are set. You can checkout the repository repo1 and work with it:
$ cd ~/tmp $ svn checkout svn://yoursite.com/repo1 $ cd repo1 $ touch x $ svn add x $ svn ci -m "" --username=user .
SVN Homepage - http://subversion.tigris.org/
The Subversion Book (Version Control with Subversion) - http://svnbook.red-bean.com/