- 切换管理员用户
sudo -i
- 安装java jdk
# 可以用yum search java查看要安装的版本
yum install java-1.8.0-openjdk
java各版本
3.安装Yum源
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
开始下载(自动下载最新版本)
yum install jenkins
4.启动
systemctl start jenkins
1)访问网址http://localhost:8080/
此时会生成一些配置文件
页面会显示Please wait while Jenkins is getting ready to work
2)修改xml文件的url
vim var/lib/jenkins/hudson.model.UpdateCenter.xml
http://mirror.xmission.com/jenkins/updates/update-center.json
3)重启jenkins
systemctl restart jenkins
4)再访问网址http://localhost:8080/
如果还是显示Please wait while Jenkins is getting ready to work,等一会再刷新
5)查看默认密码
# 查看密码
cat /var/lib/jenkins/secrets/initialAdminPassword
# 如果找不到,查找文件路径
find /var -name "initialA**"
默认密码路径
6 .漫长的下载之路
image.png
网友评论