jenkins通过supervisor配置守护进程
【摘要】 安装supervisoryum install -y supervisor复制配置jenkins将jenkins.war移动到指定目录,例如 /usr/local/jenkinsmkdir -p /usr/local/jenkinscp jenkins.war /usr/local/jenkins/复制新增文件:/etc/supervisord.d/jenkins.ini:[root@VM-...
安装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>
复制
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)