jenkins通过supervisor配置守护进程
温馨提示:
本文最后更新于 2021年06月01日,已超过 1,205 天没有更新。若文章内的图片失效(无法正常加载),请留言反馈或直接联系我。
安装supervisor
yum install -y supervisor
配置jenkins
将jenkins.war移动到指定目录,例如 /usr/local/jenkins
mkdir -p /usr/local/jenkins
cp jenkins.war /usr/local/jenkins/
新增文件:/etc/supervisord.d/jenkins.ini:
[root@VM-0-6-centos supervisord.d]# cat jenkins.ini
[program:jenkins]
command=java -jar jenkins.war --ajp13Port=-1 --httpPort=8111
directory=/usr/local/jenkins/
autorestart=true
startsecs=3
startretries=3
stdout_logfile_maxbytes=2MB
stderr_logfile_maxbytes=2MB
user=root
priority=999
numprocs=1
process_name=%(program_name)s_%(process_num)02d
启动 supervisor
systemctl start supervisord
查看状态:
[root@VM-0-6-centos supervisord.d]# supervisorctl
jenkins:jenkins_00 RUNNING pid 11977, uptime 0:03:16
supervisor> status
jenkins:jenkins_00 RUNNING pid 11977, uptime 0:03:20
supervisor> restart jenkins:jenkins_00
jenkins:jenkins_00: stopped
jenkins:jenkins_00: started
supervisor>
正文到此结束
- 本文标签: 服务架构
- 本文链接: https://www.php20.cn/article/291
- 版权声明: 本文由仙士可原创发布,转载请遵循《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权