centos7 jenkins持续化构建平台搭建

1. installation

https://www.cnblogs.com/mmzs/p/12092982.html

# sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
# rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
# yum install jenkins

2. configure

vim /etc/sysconfig/jenkins # 暂不做修改

3. start service

# systemctl  start  jenkins
# systemctl daemon-reload
# systemctl restart jenkins 
# systemctl status jenkins


http://localhost:8080/ 
# 出现 Please wait while Jenkins is getting ready to work...  
# 修改: 
vim /var/lib/jenkins/hudson.model.UpdateCenter.xml
# <url>http://updates.jenkins.io/update-center.json</url> 将https改为http
# 其他国内备用地址(也可以选择使用):
https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json
http://mirror.esuni.jp/jenkins/updates/update-center.json
# 重启服务 进行访问
# 安装推荐的插件时报错:安装过程中出现一个错误: No such plugin: cloudbees-fo
# 解决方法: 去 https://updates.jenkins-ci.org/download/plugins/cloudbees-folder/ 下载一个插件:cloudbees-folder.hpi,放入/var/lib/jenkins/plugins

4. 反向代理

server {
    listen       83;
    server_name  localhost;
    #access_log /var/log/jenkins_access_log main;
    #error_log  /var/log/jenkins_error_log  debug_http;
    client_max_body_size 60M;
    client_body_buffer_size 512k;
    location / {
        proxy_pass      http://127.0.0.1:8080/;
        proxy_redirect  off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     }
}

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值