方法一
1、下载地址:https://mirrors.huaweicloud.com/jenkins/war/2.440/jenkins.war
2、java版本大于等于11
3、yum install fontconfig
4、下载好之后在安装包所在目录执行:java -jar jenkins.war --httpPort=8080
.
5、获取密码路径cat /root/.jenkins/secrets/initialAdminPassword 31b3d4e328924ce5b7c1b88ce97a6eb5
方法二
docker run -d --name jenkins -p 82:8080 -p 50000:50000 -u root \
-v /opt/jenkins_home:/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /usr/local/python3/Python-3.6.2:/usr/local/python3/Python-3.6.2 \
-v /usr/lib64/libltdl.so.7:/usr/lib/x86_64-linux-gnu/libltdl.so.7 \
-v /usr/bin/docker:/usr/bin/docker \
-v /usr/local/apache-maven-3.9.8:/usr/local/maven \
-v /usr/local/jdk-17.0.11:/usr/local/jdk \
-v /etc/localtime:/etc/localtime \
--name jenkins jenkins/jenkins:lts