码迷,mamicode.com
首页 > 其他好文 > 详细

jenkins安装搭建及使用

时间:2019-12-13 10:46:41      阅读:96      评论:0      收藏:0      [点我收藏+]

标签:download   plugins   cat   部署   href   oca   https   localhost   location   

安装部署见官方文档:

https://jenkins.io/zh/doc/

 

替换插件下载镜像 使用清华镜像:

 

1 、修改hosts文件 

vim /etc/hosts

添加 

127.0.0.1  updates.jenkins-ci.org

2、配置Nginx代理

vim conf/nginx.conf

 

server {
listen 80;
server_name localhost;

  location /download/plugins
  {
    proxy_next_upstream http_502 http_504 error timeout invalid_header;
    proxy_set_header Host mirrors.tuna.tsinghua.edu.cn;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    rewrite /download/plugins(.*) /jenkins/plugins/$1 break;
    proxy_pass https://mirrors.tuna.tsinghua.edu.cn;
  }

}

3、下载常用插件

 

maven

git

jenkins安装搭建及使用

标签:download   plugins   cat   部署   href   oca   https   localhost   location   

原文地址:https://www.cnblogs.com/shan2017/p/12033807.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!