PS:jenkins安装方式为 yum install jenkins -y安装 # yun安装jenkins源 cat >>/etc/yum.repos.d/jenkins.repo <<-EOF [jenkins] name=Jenkins-stable baseurl=http://pkg.jenkins.io/redhat-stable gpgcheck=1 EOF # 修改jenkins源为国内源 cd /var/lib/jenkins/ find -name "default.json" #/var/lib/jenkins/updates/default.json
sed -i 's/http://updates.jenkins-ci.org/download/https://mirrors.tuna.tsinghua.edu.cn/jenkins/g' /var/lib/jenkins/updates/default.json && sed -i 's/http://www.google.com/https://www.baidu.com/g' /var/lib/jenkins/updates/default.json systemctl restart jenkins