我如何configurationsvnserve作为服务运行。
svnserve -d -r /var/svn/
只是直到服务器重新启动。
编辑1:服务器的细节
root@vps [~]# uname -a Linux vps.example.com 2.6.18-028stab070.14 #1 SMP Thu Nov 18 16:04:02 MSK 2010 x86_64 x86_64 x86_64 GNU/Linux
如果您还没有在/etc/init.d中启动服务的脚本,请创build一个脚本,然后在相关的运行级目录中添加链接。
这个过程在http://queens.db.toronto.edu/~nilesh/linux/subversion-howto/
最快的方法是将启动命令添加到/etc/rc.local/ 。 这是在系统启动结束时运行的。
“正确的”方法是使用init系统。 有一个名为/etc/init.d/skeleton的文件,这是一个用于启动服务的初始化脚本的基本框架。 将其复制到/etc/init.d/svnserve并根据需要进行自定义。 网上还有很多svnserve init文件的例子。 一旦/etc/init.d/svnserver [start|stop]按预期工作,就可以运行chkconfig svnserve on 。 这个init脚本将在启动时启动,并在closures时停止。
主pipe可能是最简单的方法。 它在EPEL中是可用的,RHEL / CentOS是一个高质量的第三方软件包存储库。
rpm -ivh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm yum install supervisor chkconfig --levels 345 supervisor on
根据文档编辑/etc/supervisord.conf。
service start supervisor
在运行级别3,4和5启动svnserve试试这个:
chkconfig --level 345 svnserve on
要检查是否可以:
systemctl list-unit-files | grep *svn*
注意:在chkconfig之前,你可以检查服务文件是否已经存在:
ls /usr/lib/systemd/system/*svn*