1. 下载collabnet subversion server rpm包
2. 安装rpm包rpm -iv client then server
3. 创建启动脚本 as /etc/init.d/svnserve
#!/bin/bash
#
# /etc/rc.d/init.d/svnserve
#
# Starts the Subversion Daemon
#
# chkconfig: 345 90 10
# description: Subversion Daemon
# processname: svnserve
source /etc/rc.d/init.d/functions
[ -x /usr/bin/svnserve ] || exit 1
# To pass additional options (for instace, -r root of directory to server) to
# the svnserve binary at startup, set OPTIONS here.
#
OPTIONS="-r /svn"
RETVAL=0
prog="svnserve"
desc="Subversion Daemon"
start() {
echo -n $"Starting $desc ($prog): "
daemon $prog -d $OPTIONS
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
echo
}
stop() {
echo -n $"Shutting down $desc ($prog): "
killproc $prog
RETVAL=$?
[ $RETVAL -eq 0 ] && success || failure
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
RETVAL=$?
;;
condrestart)
[ -e /var/lock/subsys/$prog ] && restart
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart}"
RETVAL=1
esac
exit $RETVAL
添加启动脚本到run level 3 和 5
[root@alpha init.d]# chkconfig --add svnserve
[root@alpha init.d]# chkconfig --level 35 svnserve on
现在启动客户端比如svn tortoise,browse repository就可以了
没有评论:
发表评论