CentOS + java
1. 安装JDK
确认此前未安装过JDK,如果安装过先确认jdk不是gcj版本,否则Jenkins可能运行异常,需要卸载重装JDK;
- 查看jdk版本
# java -version
- 卸载jdk
# yum remove java
- 搜索open-jdk
# yum search openjdk
- 安装open-jdk
# yum install java-1.8.0-openjdk
- 再检查JDK版本
[root@localhost ~]# java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)