【问题标题】:Script to run Rexster as a daemon in linux将 Rexster 作为 linux 中的守护进程运行的脚本
【发布时间】:2015-11-07 06:28:18
【问题描述】:

我第一次在 Debian 虚拟机的生产环境中设置 Titan 图形数据库,我正在利用 Rexster 提供进入 Titan 的接口。然而,在谷歌搜索之后,我找不到任何脚本允许 rexster 在后台作为守护进程运行。根据titan rexster with external cassandra instance,我已将 Cassandra、Elasticsearch 和 Rexster 拆分为它们自己的进程。 Cassandra 和 Elasticsearch 方便地拥有 Debian 软件包,可以开箱即用地部署守护程序脚本,但是 Rexster 没有。有没有人制作了一个脚本让 Rexster 作为守护进程运行?

查看 titan download zip ../$titan_base/bin/ 中的 rexster.sh 脚本,它调用 java 来启动 Rexster,所以我认为可以使用像 JSVC 这样的某种包装器来启动它向上,除非有更简单的方法?

【问题讨论】:

    标签: linux daemon graph-databases titan rexster


    【解决方案1】:

    处理此问题的简单通用工具是Daemonize。更多详情this post

    如果您的 Debian 足够新,可以使用 Systemd,请考虑创建一个 service script。使用脚本的关键命令是:

    systemctl start rexster.service
    systemctl enable rexster.service
    

    【讨论】:

    • 我玩过 daemonize,它确实将 rexster 作为守护程序运行,但是没有启动或停止守护程序的命令。我真的在寻找它在 vm 启动时自动启动。我确实玩过 systemd,但在我的 Debian wheezy 中,我设法破坏了我的 cassandra 和 elesticsearch 守护进程,从现在开始启动。所以我想我会远离
    • 我也尝试了 JSVC 选项,但 rexster 的起始 java 类没有所需的 init 方法,所以这不好。我现在几乎回到了原点,手动启动 rexster 进程。我真的很想知道在生产中使用 rexster 的其他人是如何解决这个问题的。
    猜你喜欢
    • 2011-01-03
    • 2013-10-14
    • 2010-10-20
    • 2015-03-21
    • 1970-01-01
    • 1970-01-01
    • 2023-03-02
    相关资源
    最近更新 更多