如何在 Centos 7 上安装 openjdk 13.x?

How can I install openjdk 13.x on Centos 7?

提问人:adrianTNT 提问时间:11/16/2023 最后编辑:Mark RotteveeladrianTNT 更新时间:11/16/2023 访问量:26

问:

我有两台装有 CentOS 7.x 的机器,其中一台我有这个(自 2020 年以来为 13.x?

java --version
openjdk 13.0.2 2020-01-14
OpenJDK Runtime Environment 19.9 (build 13.0.2+8)
OpenJDK 64-Bit Server VM 19.9 (build 13.0.2+8, mixed mode, sharing)

在另一个上,我有这个(自 2023 年以来为 11.x?

java --version
openjdk 11.0.20 2023-07-18 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.20.0.8-1.el7_9) (build 11.0.20+8-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.20.0.8-1.el7_9) (build 11.0.20+8-LTS, mixed mode, sharing)

如何在另一台计算机上安装版本 13?我看不到带有 的更新版本。yum search

在版本 13 的服务器上,它说 openjdk 来自 Epel repo:

yum info java-latest-openjdk.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
[...]
https://ookla.bintray.com/rhel/repodata/repomd.xml: [Errno 14] curl#51 - "Unable to communicate securely with peer: requested domain name does not match the server's certificate                                                            ."
Trying other mirror.
Installed Packages
Name        : java-latest-openjdk
Arch        : x86_64
Epoch       : 1
Version     : 13.0.2.8
Release     : 1.rolling.el7
Size        : 573 k
Repo        : installed
From repo   : epel
Summary     : OpenJDK Runtime Environment 13
URL         : http://openjdk.java.net/
License     : ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C
            : and zlib and ISC and FTL and RSA
Description : The OpenJDK runtime environment.

如何使用此 13.x 版本更新其他服务器?

我想要最新版本,因为我使用了一些在 11.x 版本中返回错误的工具。

存储库 centos7 java-11 yum

评论

1赞 seenukarthi 11/16/2023
“我想要最新版本。”Java 13 不是最新版本 21。
2赞 Mark Rotteveel 11/16/2023
Java 13 于 2020 年 3 月随着 Java 14 的发布而停止支持。目前支持的 Java 版本是 Java 8(支持到 2026 ~ 2030 年,具体取决于供应商和合同)、Java 11(到 2024 ~ 2032 年)、Java 17(到 2027 ~ 2029 年)和 Java 21(到 2029 ~ 2031 年)。
0赞 Pino 11/16/2023
如前所述,JDK 13 已经过时,但您可以从 jdk.java.net/archive 下载它
0赞 adrianTNT 11/17/2023
感谢提示,java.net 网址提到,有谁知道会不会是这样? 我在 Yum 找到了它,我不想破坏新的服务器设置Mercurial repomercurial.x86_64 : Mercurial -- a distributed SCM
0赞 Mark Rotteveel 11/18/2023
@adrianTNT 只有当您想签出源时才需要 Mercurial,而您不需要这样做。

答:

0赞 user3788685 12/12/2023 #1

java-latest-openjdk-18.0.2.0.9-1.rolling.el7.x86_64通过 epel-testing 存储库提供。

Name        : java-latest-openjdk
Arch        : x86_64
Epoch       : 1
Version     : 18.0.2.0.9
Release     : 1.rolling.el7
Size        : 539 k
Repo        : installed
From repo   : epel-testing
Summary     : OpenJDK 18 Runtime Environment
URL         : http://openjdk.java.net/
Licence     : ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C
            : and zlib and ISC and FTL and RSA
Description : The OpenJDK 18 runtime environment.