OrientDB 作为 Ubuntu 上的守护进程未停止

OrientDB as a daemon on Ubuntu not stopping

在以下位置 Linux/Ubuntu 上按照文档安装 orientdb,http://orientdb.com/docs/2.1/Unix-Service.html

设置以下变量:JAVA_HOME、JRE_HOME、ORIENTDB_HOME 并在以下文件中进行以下更改,

orientdb.sh

#!/bin/sh
# OrientDB service script
#
# Copyright (c) Orient Technologies LTD (http://www.orientechnologies.com)

# chkconfig: 2345 20 80
# description: OrientDb init script
# processname: orientdb.sh

# You have to SET the OrientDB installation directory here
ORIENTDB_DIR="/local/some-location"
ORIENTDB_USER="some-user"

正在为 systemmd 安装 /etc/systemd/system/orientdb.服务

[Unit]
Description=OrientDB Server
After=network.target
After=syslog.target

[Install]
WantedBy=multi-user.target

[Service]
Type=forking
ExecStart=/local/some-location/bin/orientdb.sh start
ExecStop=/local/some-location/bin/orientdb.sh stop
ExecStatus=/local/some-location/bin/orientdb.sh status

可以通过以下命令启动服务

systemctl start orientdb.service

但是在给出以下命令后服务不会停止

systemctl stop orientdb.service

机器信息:

关闭 2 时出现问题。1.x 请参阅:Joe Taras 评论。您应该更新到最新的 2.2.x 版本。

根据这个修改你的服务文件:

$猫/etc/systemd/system/orientdb.服务

[Unit]
Description=OrientDB Server
After=network.target
After=syslog.target

[Install]
WantedBy=multi-user.target

[Service]
User=<USER>
Group=<GROUP>
ExecStart=<ORIENTDB_INSTALL_PATH>/bin/server.sh
SuccessExitStatus=143

修改您的用户、组和路径。

比重新加载服务 systemctl daemon-reload

我在 Fedora23 上使用它。


告诉我。

伊万


编辑

在 Ubuntu 15.04 上试过,它有效。