Setting up the trial server was straightforward. On (Mandriva) Linux,
after the usual package selection and update process we had an svn
user ready to serve the repository, and an /etc/xinet.d/svnserve
configuration file.
# default: off
# description: svnserve is the server part of Subversion.
service svnserve
{
disable = yes
port = 3690
socket_type = stream
protocol = tcp
wait = no
user = svn
server = /usr/bin/svnserve
server_args = -i -r /var/lib/svn/repositories
}
Most of the contents of this configuration file should be easy to
figure out. The actual program which will serve the repository is
/user/bin/svnserve
(run as a daemon by xinetd) and it should be run by
user svn
with arguments -i
(inetd mode) and
-r /var/lib/svn/repositories
(root of directory to serve).
Once we had created the repository (see next section) in the configured location, we enabled the Subversion server as follows:
su # root runs xinetd
chkconfig svnserve on # enable svnserve service
service xinetd restart
Note here that although the root
user starts the xinetd
service, the
svn
user actually owns and serves the repository.
There are two main options for serving a Subversion repository:
A full discussion of the pros and cons of these options can be found in the Subversion book. We opted to use the custom svnserve server because, according to the documentation it would be easier to set up and somewhat faster. Whilst I have no experience of using Apache as a Subversion server, I can certainly confirm that svnserve is simple to set up.
Copyright © 2006 Thomas Guest |