linux – 当我重新启动Ubuntu服务器时如何重新启动sphinx?
发布时间:2020-05-24 00:14:22 所属栏目:Linux 来源:互联网
导读:我在我的ubuntu 9.04服务器上构建并安装了sphinx搜索. 重启后如何让sphinx守护程序自动启动? 我不知道Sphinx,但这是基本的方法.使用以下内容创建一个文件/etc/init.d/searchd(也有 this script,但您可能需要稍微调整一下): #!/bin/bashcase ${1:-} in start
|
我在我的ubuntu 9.04服务器上构建并安装了sphinx搜索. 重启后如何让sphinx守护程序自动启动? 解决方法我不知道Sphinx,但这是基本的方法.使用以下内容创建一个文件/etc/init.d/searchd(也有 this script,但您可能需要稍微调整一下):#!/bin/bash
case "${1:-''}" in
'start')
# put the command to start sphinx
# i.e.,/usr/bin/searchd start or /usr/bin/searchd --daemon or whatever the command is
;;
'stop')
# stop command here
;;
'restart')
# restart command here
;;
*)
echo "Usage: $SELF start|stop|restart"
exit 1
;;
esac
然后执行以下操作: $sudo update-rc.d searchd defaults 要手动控制服务: $sudo /etc/init.d/searchd <start|stop|restart> (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
