ssdb设置开启自启动

环境:
OS:Centos 7
添加ssdb开机自动启动
1.添加ssdb服务
vi /usr/lib/systemd/system/ssdb.service
文件内容如下:
[Unit]
Description=ssdb
After=network.target
After=syslog.target

[Install]
WantedBy=multi-user.target

[Service]
Type=forking
User=root
Group=root
ExecStart=/usr/local/services/ssdb/ssdb-master/ssdb-server -d /usr/local/services/ssdb/ssdb-master/ssdb.conf
ExecReload=
ExecStop=/usr/local/services/ssdb/ssdb-master/ssdb-server /usr/local/services/ssdb/ssdb-master/ssdb.conf -s stop
PrivateTmp=true

2.设置开机启动
chmod 754 /usr/lib/systemd/system/ssdb.service

systemctl enable ssdb.service
systemctl status ssdb.service
systemctl start ssdb.service
systemctl stop ssdb.service

posted @ 2019-09-25 08:52  slnngk  阅读(587)  评论(0编辑  收藏  举报