jenkins安装搭建及使用
安装部署见官方文档:
替换插件下载镜像 使用清华镜像:
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