4
zentao automatic start
source link: https://pinghailinfeng.gitee.io/2023/07/11/zentao-automatic-start/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Centos禅道自启动
有时候linux服务器关机还要手动启动禅道服务,很麻烦,就添加一行命令或一个脚步或设置开机自行启动
第一种方法
/etc/rc.local 中添加 /opt/zbox/zbox start
第二种方法
CentOS7设置自定义开机启动,添加自定义系统服务
建立service文件
vim /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-
# 以754的权限保存在目录
chmod u+x zentao.service 查看服务状态
systemctl stutus zentao
设置开机启动
systemctl enable zentao.service
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK