1、搜索jdk安装包
[root@les ~]# yum search java|grep jdk
ldapjdk-javadoc.noarch : Javadoc for ldapjdk
java-1.7.0-openjdk.aarch64 : OpenJDK Runtime Environment
java-1.7.0-openjdk-accessibility.aarch64 : OpenJDK accessibility connector
java-1.7.0-openjdk-demo.aarch64 : OpenJDK Demos
java-1.7.0-openjdk-devel.aarch64 : OpenJDK Development Environment
java-1.7.0-openjdk-headless.aarch64 : The OpenJDK runtime environment without
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.7.0-openjdk-src.aarch64 : OpenJDK Source Bundle
java-1.8.0-openjdk.aarch64 : OpenJDK 8 Runtime Environment
java-1.8.0-openjdk-accessibility.aarch64 : OpenJDK accessibility connector
java-1.8.0-openjdk-demo.aarch64 : OpenJDK 8 Demos
java-1.8.0-openjdk-devel.aarch64 : OpenJDK 8 Development Environment
java-1.8.0-openjdk-headless.aarch64 : OpenJDK 8 Headless Runtime Environment
java-1.8.0-openjdk-javadoc.noarch : OpenJDK 8 API documentation
java-1.8.0-openjdk-javadoc-zip.noarch : OpenJDK 8 API documentation compressed
java-1.8.0-openjdk-src.aarch64 : OpenJDK 8 Source Bundle
java-11-openjdk.aarch64 : OpenJDK 11 Runtime Environment
java-11-openjdk-demo.aarch64 : OpenJDK 11 Demos
java-11-openjdk-devel.aarch64 : OpenJDK 11 Development Environment
java-11-openjdk-headless.aarch64 : OpenJDK 11 Headless Runtime Environment
java-11-openjdk-javadoc.aarch64 : OpenJDK 11 API documentation
java-11-openjdk-javadoc-zip.aarch64 : OpenJDK 11 API documentation compressed in
java-11-openjdk-jmods.aarch64 : JMods for OpenJDK 11
java-11-openjdk-src.aarch64 : OpenJDK 11 Source Bundle
java-11-openjdk-static-libs.aarch64 : OpenJDK 11 libraries for static linking
ldapjdk.noarch : The Mozilla LDAP Java SDK
2、下载安装,下载之后默认的目录为: /usr/lib/jvm/
[root@les ~]# yum install java-1.8.0-openjdk
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package 1:java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64 already installed and latest version
Nothing to do
3、验证结果
[root@les ~]# java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)