Subversion server, installing
From NAS-Central Buffalo - The Linkstation Wiki
m |
|||
| Line 63: | Line 63: | ||
exit 0 | exit 0 | ||
| - | 5. Set your server to start at the correct runlevels. I did this | + | {{Postit|Call for help! | Is there a simpler way to set up the runlevels on Debian? }} |
| + | |||
| + | 5. Set your server to start at the correct runlevels. I did this by creating symbolic links to <tt>/etc/init.d/svnserve</tt>: I created <tt>/etc/rc1.d/K92svnserve</tt>, <tt>/etc/rc2.d/S92svnserve</tt>, <tt>/etc/rc3.d/S92svnserve</tt>, <tt>/etc/rc4.d/S92svnserve</tt>, <tt>/etc/rc5.d/S92svnserve</tt>. | ||
[[Category:Debian]] | [[Category:Debian]] | ||
Revision as of 13:01, 30 January 2007
This article describes setting up a simple Subversion server for your LAN using svnserve. You can choose more advanced configurations if you prefer (see http://svnbook.red-bean.com/ for more information).
1. First let's install Subversion. Use the command:
apt-get install subversion
2. You may like to install these too:
apt-get install subversion-tools db4.4-util patch xml-core
3. Create your repository. I like to use a directory that contains multiple repositories, one for each project; svnserve is quite happy to serve all of them. For example,
mkdir /home/svnrepos svnadmin create /home/svnrepos/project1
4. Create /etc/init.d/svnserve as follows:
#! /bin/sh -e
#### BEGIN INIT INFO
# Provides: synserve
# Required-Start: $syslog $time $local_fs $remote_fs
# Required-Stop: $syslog $time $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: Subversion repository server
# Description: Debian init script for the Subversion repository server
### END INIT INFO
#
# Author: Rick Beton
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/bin/svnserve
REPOS=/home/svnrepos
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting Subversion server" "svnserve"
$DAEMON -d -r $REPOS
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping Subversion server" "svnserve"
killproc $DAEMON
log_end_msg $?
;;
force-reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/svnserve {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
| Call for help! |
| Is there a simpler way to set up the runlevels on Debian? |
5. Set your server to start at the correct runlevels. I did this by creating symbolic links to /etc/init.d/svnserve: I created /etc/rc1.d/K92svnserve, /etc/rc2.d/S92svnserve, /etc/rc3.d/S92svnserve, /etc/rc4.d/S92svnserve, /etc/rc5.d/S92svnserve.

