rpm安装jenkins

rpm 包下载地址

https://mirrors.tuna.tsinghua.edu.cn/jenkins/

rpm安装

rpm -ivh jenkins-2.183-1.1.noarch.rpm

修改配置文件

vi /etc/sysconfig/jenkins

#修改:JENKINS_USER = "root"
#修改:JENKINS_PORT = "8888"

#修改jdk路径
vi /etc/init.d/jenkins
在 candidates 后追加jdk 安装路径
/usr/local/bin/jdk1.8.0_162/bin/java (一直到jdk安装路径下的bin/java)
# echo $JAVA_HOME 可以查看JAVA_HOME的路径

systemctl daemon-reload
# 启动jenkins
systemctl start jenkins

#如果没有关闭防火墙需要关闭防火墙
service firewalld stop

vi /var/lib/jenkins/hudson.model.UpdateCenter.xml
#将 https://updates.jenkins.io/update-center.json" 修改为 
#http://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json

# 修改国内镜像地址
cd /var/lib/jenkins/updates

sed -i 's/http:\/\/www.google.com/https:\/\/www.baidu.com/g' default.json

sed -i 's/https:\/\/updates.jenkins.io\/download/http:\/\/mirrors.tuna.tsinghua.edu.cn\/jenkins/g' default.json

posted @ 2022-02-09 17:29  紫川先生  阅读(269)  评论(0编辑  收藏  举报