1 JDK11 install
# 用的yum安装
# 压缩包安装,下载的jdk-11.0.22_linux-x64_bin.tar.gz在EC2解压,配置环境变量,运行jenkins的时候会报错
$ yum -y list java-11*
Available Packages
java-11-amazon-corretto-devel.x86_64 1:11.0.23+9-1.amzn2023 @amazonlinux
java-11-amazon-corretto-headless.x86_64 1:11.0.23+9-1.amzn2023 @amazonlinux
java-11-amazon-corretto.x86_64 1:11.0.23+9-1.amzn2023 amazonlinux
java-11-amazon-corretto-javadoc.x86_64 1:11.0.23+9-1.amzn2023 amazonlinux
java-11-amazon-corretto-jmods.x86_64 1:11.0.23+9-1.amzn2023 amazonlinux
$ sudo yum install java-11-amazon-corretto-devel.x86_64
$ java -version
# 配置JAVA_HOME
$ vi .bashrc
export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64
export PATH=$JAVA_HOME/bin:$PATH
$ source .bashrc
2 jenkins install
War Jenkins Packages,download version supported by JDK11
3 run jenkins
$ java -jar jenkins.war --httpPort=8080
vist http://localhost:8080