- 百度找到的加速下載插件的方式無非是離線下載上傳或者修改`升級站點`的錯誤方法(這些方法100%不奏效,你們要是能夠的話算我輸)
要點:nginx
實操vim
1. 配置nginx下載源 #] cat > /etc/yum.repos.d/nginx.repo << EOF [nginx-stable] name=nginx stable repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=1 enabled=1 gpgkey=https://nginx.org/keys/nginx_signing.key module_hotfixes=true EOF 2. 安裝nginx #] yum -y install nginx 3. 代理配置 #] vim /etc/nginx/conf.d/jenkins_proxy.conf server { listen 80; server_name updates.jenkins-ci.org; access_log /data/logs/nginx/jenkins_proxy.log; location /download/plugins { proxy_set_header Host mirrors.tuna.tsinghua.edu.cn; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; rewrite /download/plugins(.*) /jenkins/plugins/$1 break; proxy_pass http://mirrors.tuna.tsinghua.edu.cn; } } #] nginx && nginx -t && nginx -s reload 4. jenkins hosts配置 #] vim /etc/hosts 10.18.99.39 updates.jenkins-ci.org 5. 插件下載測試