[root@jenkins ~]#
sed -i.bak 's#updates.jenkins.io/download#mirror.tuna.tsinghua.edu.cn/jenkins#g' /var/lib/jenkins/updates/default.json
[root@jenkins ~]#sed -i 's#www.google.com#www.baidu.com#g' /var/lib/jenkins/updates/default.json
#注意:如果是tomcat运行war包方式需要下面路径
[root@jenkins ~]#sed -i.bak 's#https://updates.jenkins.io/download#https://mirror.tuna.tsinghua.edu.cn/jenki ns#g' /root/.jenkins/updates/default.json
升级站点URL替换成国内镜像地址
#国内镜像源
https://mirror.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json
https://plugins.jenkins.io
国内站点插件下载地址:
https://mirrors.tuna.tsinghua.edu.cn/jenkins/plugins/
[root@jenkins ~]#systemctl stop jenkins
[root@jenkins ~]#tar jenkins_plugins.tar.gz -C /var/lib/jenkins/plugins/
[root@jenkins ~]#chown -R jenkins.jenkins /var/lib/jenkins/plugins/
[root@jenkins ~]#systemctl start jenkins