龙空技术网

【Java】在 CentOS 7 上安装 Corretto JDK17

小丛的知识窝 54

前言:

如今大家对“centos6安装jdk17”可能比较关怀,朋友们都想要剖析一些“centos6安装jdk17”的相关文章。那么小编在网摘上网罗了一些关于“centos6安装jdk17””的相关知识,希望姐妹们能喜欢,兄弟们快快来学习一下吧!

下载 Corretto JDK 17 的 RPM 包。

在以下链接中找到适用于 CentOS 7 的 RPM 包:

使用 wget 命令下载 RPM 包

wget 
--2023-04-05 07:29:13--   corretto.aws (corretto.aws)... 18.164.96.38, 18.164.96.84, 18.164.96.121, ...Connecting to corretto.aws (corretto.aws)|18.164.96.38|:443... connected.HTTP request sent, awaiting response... 302 Moved TemporarilyLocation: /downloads/resources/17.0.6.10.1/java-17-amazon-corretto-devel-17.0.6.10-1.x86_64.rpm [following]--2023-04-05 07:29:13--   existing connection to corretto.aws:443.HTTP request sent, awaiting response... 200 OKLength: 193650095 (185M) [binary/octet-stream]Saving to: ‘amazon-corretto-17-x64-linux-jdk.rpm’100%[===================================================================================================================================================================>] 193,650,095 89.7MB/s   in 2.1s2023-04-05 07:29:16 (89.7 MB/s) - ‘amazon-corretto-17-x64-linux-jdk.rpm’ saved [193650095/193650095]
安装 RPM 包
sudo yum localinstall amazon-corretto-17-x64-linux-jdk.rpm -y
检查 Java 是否已安装成功
java -version
openjdk version "17.0.6" 2023-01-17 LTSOpenJDK Runtime Environment Corretto-17.0.6.10.1 (build 17.0.6+10-LTS)OpenJDK 64-Bit Server VM Corretto-17.0.6.10.1 (build 17.0.6+10-LTS, mixed mode, sharing)

如图所示安装成功

标签: #centos6安装jdk17 #centos安装缺rpm包 #centos配置jdk17 #centosrpm安装jdk16