云原生DevOps

20230117-Jenkins环境部署

2023-01-17  本文已影响0人  負笈在线

1、 Jenkins 部署

java环境准备,安装java-11-openjdk

# yum install fontconfig java-11-openjdk -y
# java -version
openjdk version "11.0.17" 2022-10-18 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.17.0.8-2.el8_6) (build 11.0.17+8-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.17.0.8-2.el8_6) (build 11.0.17+8-LTS, mixed mode, sharing)

导入jenkins.repo

# wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
# rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key

Jenkins安装

# yum install jenkins -y

启动Jenkins,并设置自启动

# systemctl start jenkins.service
# systemctl status jenkins.service 
# systemctl enable jenkins.service 

查看管理员密码

# cat /var/lib/jenkins/secrets/initialAdminPassword
0e478891a46946b3b9ce2bd540fdd6b5

2、 Jenkins 简单配置

登录Jenkins页面:http://172.26.37.128:8080/
1)初始化设置,主要安装插件等,可以先不安装,待需要时再安装;
2)设置admin用户密码
3)设置国内插件源:Dashboard--Manage Jenkins--Plugin Manager--Advanced settings,设置为插件源https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json
4)安装插件,暂时先安装以下常用插件,以及DevOps相关插件

参考URL

https://pkg.jenkins.io/redhat-stable/
http://t.zoukankan.com/zhoading-p-15085279.html
http://wjhsh.net/software-test-p-7068262.html

上一篇下一篇

猜你喜欢

热点阅读