1.旧版本长时间没有升级,插件升级建议先做备份快照
查看当前java版本
[root@ip-10-171-1-80 plugins]# java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
?查看可更新版本
[root@ip-10-171-1-80 plugins]# update-alternatives --list
libnssckbi.so.x86_64 auto /usr/lib64/pkcs11/p11-kit-trust.so
ld auto /usr/bin/ld.bfd
cifs-idmap-plugin auto /usr/lib64/cifs-utils/cifs_idmap_sss.so
mta auto /usr/sbin/sendmail.postfix
iptables auto /usr/sbin/iptables-legacy
java manual /usr/java/jdk1.8.0_181-amd64/jre/bin/java
javac auto /usr/lib/jvm/java-11-amazon-corretto/bin/javac
更新java版本
[root@ip-10-171-1-80 plugins]# update-alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
+ 1 /usr/java/jdk1.8.0_181-amd64/jre/bin/java
* 2 /usr/lib/jvm/java-11-amazon-corretto/bin/java
Enter to keep the current selection[+], or type selection number: 2
?查看版本
[root@ip-10-171-1-80 plugins]# java -version
openjdk version "11.0.14" 2022-01-18 LTS
OpenJDK Runtime Environment Corretto-11.0.14.9.1 (build 11.0.14+9-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.14.9.1 (build 11.0.14+9-LTS, mixed mode)
centos6
sudo yum install dejavu-sans-fonts
centos7
sudo yum install fontconfig
重启jenkins
[root@ip-10-171-1-80 plugins]# systemctl restart jenkins
[root@ip-10-171-1-80 plugins]# systemctl status jenkins
|