zentao.service

2024-08-27

zentao开机自启动

1.create zentao.service

cat << EOF > /lib/systemd/system/zentao.service

[Unit]
Description=zentao
After=network.target

[Service]
Type=forking
ExecStart=/opt/zbox/zbox start
ExecReload=/opt/zbox/zbox restart
ExecStop=/opt/zbox/zbox stop
PrivateTmp=true

[Install]
WantedBy=multi-user.target
EOF

3.设置开机自启动
systemctl enable zentao.service

4.停止开机自启动:
systemctl disable zentao.service

5、启动zentao服务:
systemctl start zentao.service

6.重新启动服务:
systemctl restart zentao.service

7.查看所有已启动的服务:
systemctl list-units --type=service

分类:Linux | 标签: |

相关日志

评论被关闭!