其他分享
首页 > 其他分享> > ssdb设置开启自启动

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

标签:service,ssdb,开启,systemctl,master,usr,自启动,local
来源: https://www.cnblogs.com/hxlasky/p/11582329.html