Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I configure svnserve to run as a service.

svnserve -d -r /var/svn/

just works until the server is restarted.

Edit1: server details

root@vps [~]# uname -a
Linux 2.6.18-028stab070.14 #1 SMP Thu Nov 18 16:04:02 MSK 2010 x86_64 x86_64 x86_64 GNU/Linux
share|improve this question

If you've not already got a script for starting the service in /etc/init.d, create one, then add links in the relevant runlevel dirs.

The process is described at

share|improve this answer
I am looking at the sample script, but (1) I dont run it under any 'svn'-specific user. Currently I've been running svnserve -d ... as root. (2) I dont think I have the file startproc anywhere on my system. – siliconpi Jan 25 '11 at 13:43
any thoughts on how i can do this? – siliconpi Jan 29 '11 at 13:08

The fastest way to get it going would be to add the startup command to /etc/rc.local/. This is run at the end of the system boot.

The "proper" way is to use the init system. There's a file called /etc/init.d/skeleton which is a basic framework for making an init script for starting a service. Copy it to /etc/init.d/svnserve and customise it as needed. There's also plenty of examples of svnserve init files on the web. Once /etc/init.d/svnserver [start|stop] works as expected, you can then run chkconfig svnserve on. This init script will be then be started on boot, and stopped on shutdown.

share|improve this answer
Hi @Niall - the file doesnt exist on the rhel/centos system that I have... – siliconpi Jan 25 '11 at 13:45
Sorry, should be /etc/init.d/skeleton! Main post updated. – Niall Donegan Jan 25 '11 at 13:54
Hmm... root@vps [~]# find / -name 'skeleton' didnt find anything – siliconpi Jan 25 '11 at 14:32
any alternate thoughts? – siliconpi Jan 29 '11 at 13:07
hmm, looks like /etc/init.d/skeleton is a Debian thing! The best bet is to look for the many svnserve init scripts available on the web, for example: – Niall Donegan Jan 31 '11 at 10:25

Supervisor may be the easiest way to do this. It's available in EPEL, a high-quality 3rd party repository of packages for RHEL/CentOS.

rpm -ivh
yum install supervisor
chkconfig --levels 345 supervisor on

Edit /etc/supervisord.conf according the docs.

service start supervisor
share|improve this answer

To start svnserve at runlevel 3,4 and 5 try this :

chkconfig --level 345 svnserve on

To check if it's OK :

systemctl list-unit-files | grep *svn*

Screenshot for systemctl list-unit-files | grep *svn*

Note : before chkconfig you can check if service file already exists:

ls  /usr/lib/systemd/system/*svn*

screenshot for ls  /usr/lib/systemd/system/*svn*

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.