加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – 当我重新启动Ubuntu服务器时如何重新启动sphinx?

发布时间:2020-12-13 18:09:18 所属栏目:Linux 来源:网络整理
导读:我在我的ubuntu 9.04服务器上构建并安装了sphinx搜索. 重启后如何让sphinx守护程序自动启动? 解决方法 我不知道Sphinx,但这是基本的方法.使用以下内容创建一个文件/etc/init.d/searchd(也有 this script,但您可能需要稍微调整一下): #!/bin/bashcase "${1:
我在我的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>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读