jenkins通过supervisor配置守护进程

释放双眼,带上耳机,听听看~!

安装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>

本文为仙士可原创文章,转载无需和我联系,但请注明来自仙士可博客www.php20.cn

转自仙士可博客www.php20.cn

服务架构

分布式学习三:BASE理论

2022-3-2 15:18:54

服务架构

网站关于高并发时候的应该采取一些优化方案

2022-3-2 15:22:30

搜索