jenkin部署

安装jdk

按需要版本下载 jenkins包
https://jenkins.io

useradd jenkins
mkdir /opt/jenkins
mkdir /opt/data/jenkins
chown jenkins:jenkins -R /opt/jenkins
chown jenkins:jenkins -R /opt/data/jenkins

装supervisor管理,设置JAVA_HOME,JENKINS_HOME
[program:jenkins]
environment=JAVA_HOME="/usr/java/jdk1.8.0_131",JENKINS_HOME="/opt/data/jenkins/"
command=java -jar jenkins.war
directory=/opt/jenkins
process_name=%(program_name)s
numprocs=1
autostart=true
autorestart=true
startsecs=3
startretries=2
user=jenkins
stdout_logfile=/opt/logs/supervisor/%(program_name)s_stdout.log
stdout_logfile_maxbytes=10MB
stderr_logfile=/opt/logs/supervisor/%(program_name)s_stderr.log
stdout_logfile_maxbytes=10MB

启动后修改生成的文件
1 vim /opt/data/jenkins/updates/default.json
修改安装插件前检查网络的url:connectionCheckUrl":"http://www.baidu.com/ url改成www.baidul.com之类的可访问url
2 vim /opt/data/jenkins/hudson.model.UpdateCenter.xml
修改https://updates.jenkins.io/update-center.json https为http

重启jenkins

访问ip:8080 端口可以改在启动命令后面加 --httpPort=8899

第一次登陆空白页就重启下jenkins

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页