[root@localhost software]# wget https://mirrors.tuna.tsinghua.edu.cn/jenkins/redhat-stable/jenkins-2.361.4-1.1.noarch.rpm
该版本要使用jdk11
[root@localhost software]# mkdir -p /var/cache/jenkins
[root@localhost software]# mkdir -p /var/log/jenkins
[root@localhost software]# mkdir -p /var/lib/jenkins
[root@localhost software]# rpm -ivh jenkins-2.361.4-1.1.noarch.rpm
vim /etc/sysconfig/jenkins
JENKINS_USER=“jenkins”
JENKINS_PORT=“8080”
systemctl restart jenkins.service
/var/lib/jenkins/secrets/initialAdminPassword
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo --no-check-certificate
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
yum -y install jenkins