SUSE Linux subversion服务器自启动

来源: 作者:佚名 2008-01-23 出处:pcdog.com

linux  

  通过以下几个步骤,将svnserve设置为开机自启动的服务了。
 
  1. 阅读/etc/init.d/svnserve脚本,从下面的片段中得到启发,去改/etc/sysconfig/svnserve中的设置
 
 
...
SVNSERVE_BIN=/usr/bin/svnserve
...
SVNSERVE_CONFIG=/etc/sysconfig/svnserve
...
. $SVNSERVE_CONFIG
...
case "$1" in
start)
echo -n "Starting svnserve "
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
startproc -u "$SVNSERVE_USERID" -g "$SVNSERVE_GROUPID" -e $SVNSERVE_BIN $SVNSERVE_OPTIONS
...


 
  2. 修改/etc/sysconfig/svnserve文件中的下列内容
 
  #####注意去掉-R,否则会强制只读;
 
  #####注意仓库的路径要拼写正确
 
  SVNSERVE_OPTIONS="-d -r /home/zhangrui/project/svnRepository/sft"
 
  #####设为存在的用户和用户组,我就设为自己常用登录的用户了
 
  SVNSERVE_USERID="zhangrui"
 
  SVNSERVE_GROUPID="users"
 
  3. 在YAST——>系统——>系统服务 中开启svnserve服务(level3,5)
 
  或者用root运行chkconfig -s svnserve on
 
  后记:方法当然不止一个,网上有说用自启动脚本的,有说用xinetd启动的。我还是喜欢自己用的这个方法,会在启动过程中出现一行“Starting svnserve done”。
 


更多内容请看PCdog.com--FTP服务器  Linux服务器配置  操作系统专题
上一篇:Linux系统通过手机GPRS功能无线上网
下一篇:Linux服务器的常用备份方法