Running Subversion From xinetd
Now that we have Subversion installed on our server, we really need some way to have it always available. We could run subversion in daemon mode but we would have to write init.d scripts which can get rather complex (especially if you are writing one properly, and not just hacking one together).
Instead, we will add subversion to xinetd. The benefit of this is that subversion is only running when we need access to the repository rather than running all the time. By default, subversion is not set up in xinetd, so the following is how I set it up:
First make sure that xinetd is installed.
# yum install xinetd
Next we want to add the following to our /etc/xinetd.d/svnserve
# default: off
# description: svnserve is the server part of Subversion.
service svn
{
disable = no
port = 3690
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/svnserve
server_args = -i -r /svn
}
Finally, lets restart xinetd:
/etc/init.d/xinetd restart
Now xinetd will start the subversion repository server every time a subversion request is made.
