[email protected] ~ / echo Jenkins /etc/hostname [email protected] ~ / hostname Jenkins Per...">

当前位置:网站首页>Jenkins installation and upgrade

Jenkins installation and upgrade

2022-06-22 18:13:00 Non famous operation and maintenance

1. Prepare basic environment and Jenkins Installation package

[[email protected] ~]# echo Jenkins > /etc/hostname
[[email protected] ~]# hostname Jenkins

-- Permanently shut down the firewall and Selinux
[[email protected] ~]#  systemctl disable firewalld
[[email protected] ~]#  systemctl stop firewalld
[[email protected] ~]#  setenforce 0
[[email protected] ~]#  sed -i 's/enforcing/disabled/' /etc/selinux/config
[[email protected] ~]# getenforce

2. install Jenkins Follow Java

[[email protected] ~]# ls
jenkins-2.283-1.1.noarch.rpm

[[email protected] ~]# yum -y install java-11-openjdk-devel

[[email protected] ~]# yum localinstall jenkins-2.283-1.1.noarch.rpm

3. start-up Jenkins

[[email protected] ~]# java -version
openjdk version "1.8.0_322"
OpenJDK Runtime Environment (build 1.8.0_322-b06)
OpenJDK 64-Bit Server VM (build 25.322-b06, mixed mode)

[[email protected] ~]# systemctl start jenkins   # start-up Jenkins

[[email protected] ~]# systemctl enable jenkins   # Configure self startup 

4. To configure Windows Domain name resolution ( Test only , Real domain names don't need )

5. see Jenkins Unlock password

[[email protected] ~]# cat /var/lib/jenkins/secrets/initialAdminPassword
2eda0e3095d04446a05ace706c193e5e

Be careful :

  If you want to directly use the domain name to access Jenkins, No port 8080 Words , Can install Nginx To configure the reverse proxy, you can directly use the domain name to access Jenkins!

6. Configure login Jenkins password

7. modify Jenkins The default download site is domestic

Tsinghua University open source mirror station :https://mirror.tuna.tsinghua.edu.cn/jenkins/updates/

8.Jenkins Chinese plug-in installation

Localization: Chinese (Simplified) ---> The installation takes effect after restart

Locale ---> After installation Jenkins Configure language in settings

Insert picture description here

  After installation, restart Jenkins That's all right. !

9.Jenkins Version update

download Jenkins upgrade war package

Qinghua open source image station :https://mirror.tuna.tsinghua.edu.cn/jenkins/war-stable/ perhaps http://ftp-chi.osuosl.org/pub/jenkins/war-stable/ Download the latest installation war package , If there is a new bag Jenkins There will also be prompts in the background , Just download it directly .( But the latest version , There is instability )

upgrade

[[email protected] ~]# ps -aux | grep jenkins    # lookup Jenkins Running path 

jenkins   11910  4.2 28.2 2378336 282124 ?      Ssl  02:55   2:34 /etc/alternatives/java -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20
root      12689  0.0  0.0 112720   984 pts/0    R+   03:56   0:00 grep --color=auto jenkins

[[email protected] ~]# systemctl stop  jenkins    # stop it jenkins service 

[[email protected] ~]# cd /usr/lib/jenkins/   # Get into Jenkins.war Running path 

[[email protected] jenkins]# ls
jenkins.war

[[email protected] jenkins]# mv jenkins.war jenkins.war.bak    # Back up the old version of Jenkins.war

[[email protected] jenkins]# mv /root/jenkins.war .   # Copy the new version of Jenkins to update war Package to Jenkins Running path 

[[email protected] jenkins]# ls
jenkins.war  jenkins.war.bak

[[email protected] jenkins]# systemctl start jenkins    # start-up Jenkins
原网站

版权声明
本文为[Non famous operation and maintenance]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206221638317232.html