yum命令安装jenkins
主机地址
192.168.100.135
系统centos7.5
版本:jenkins-2.414
1.前提安装了java
[root@zxh7-5 ~]# java -version
openjdk version "11.0.19" 2023-04-18 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.19.0.7-1.el7_9) (build 11.0.19+7-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.19.0.7-1.el7_9) (build 11.0.19+7-LTS, mixed mode, sharing)
2.获取jenkins源文件
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
3.导入jenkins公钥
rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
4.yum安装jenkins
[root@zxh7-5 ~]# yum -y install jenkins --nogpgcheck
文件目录说明:
/usr/lib/jenkins/ #jenkins安装目录,WAR包会放在这里。
/etc/sysconfig/jenkins #jenkins配置文件
/var/lib/jenkins/ #默认的JENKINS_HOME。
/var/log/jenkins/jenkins.log #日志文件
5.启动jenkins
systemctl start jenkins
6.如果刚安装好,进去特别卡的话,出现下面的画面,直接换镜像元
修改配置文件
[root@k8s-master jenkins]# vim hudson.model.UpdateCenter.xml
[root@k8s-master jenkins]# pwd
/var/lib/jenkins
[root@k8s-master jenkins]#
[root@k8s-master jenkins]# cat hudson.model.UpdateCenter.xml
<?xml version='1.1' encoding='UTF-8'?>
<sites>
<site>
<id>default</id>
<url>https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json</url>
</site>
</sites>
标签:root,11.0,yum,master,jenkins,k8s,安装
From: https://www.cnblogs.com/jbjlogs/p/17562811.html