What is the most basic set of steps required to set up SVN on a fresh installation of Slackware 12?
3 Answers
Subversion already exists in Slackware 12, so you can just install it at setup time. Or you can install it later using installpkg subversion-1.4.4-i486-1.tgz
To start svn server automatically at boot time i'm wrote this script. Name it rc.svnserve and put into /etc/rc.d/ dir. Then insert call 'rc.svnserve start' in script rc.inet2 or rc.local at your flavour.
#!/bin/sh
# Start/stop/restart svn server.
# Start svnserve:
svnserve_start() {
CMDLINE="/usr/bin/svnserve -d -r /home/svn/repositories "
echo -n "Starting SVN daemon: $CMDLINE"
$CMDLINE --pid-file /var/run/svnserve.pid
echo
}
# Stop svnserve:
svnserve_stop() {
echo -n "Stopping SVN daemon..."
kill `cat /var/run/svnserve.pid`
echo
sleep 1
rm -f /var/run/svnserve.pid
}
# Restart svnserve:
svnserve_restart() {
svnserve_stop
sleep 1
svnserve_start
}
case "$1" in
'start')
svnserve_start
;;
'stop')
svnserve_stop
;;
'restart')
svnserve_restart
;;
*)
echo "usage $0 start|stop|restart"
esac
-
Personally I've done it even simpler, I simply added
/usr/bin/svnserve -d -v /home/svn
to /etc/rc.d/rc.local, but your version is cleaner :)– wazooxJul 30, 2009 at 11:37
1) Download. (http://subversion.tigris.org/)
2) Follow installation instructions.
There you go, that's just about the most basic set of steps I can think of. =:)
Download svn, and do a ./configure && make install.
Choose a directory to be the root of your subversion server (we'll pretend you chose /var/svn and you're logged in as root) and call 'svnadmin create /var/svn/'. Create a subversion user and do a 'chown -R subversion /var/svn/'.
Now that you've got your directory ready to roll, start the subversion server with 'sudo -u subversion svnserve -dr /var/svn/'. To have it start up at boot, add that line to /etc/rc.d/rc.local.