新建文件:/usr/lib/systemd/system/zentao.service
内容如下:
[Unit] Description=zantao After=network.target [Service] Type=forking ExecStart=/opt/zbox/zbox start ExecReload=/opt/zbox/zbox restart ExecStop=/opt/zbox/zbox stop [Install] WantedBy=multi-user.target
然后执行:
systemctl start zentao systemctl stop zentao systemctl restart zentao systemctl enable zentao