环境:
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