如何在亚马逊 Linux 上安装 openjdk "1.8.0_20-b26"?

How to install openjdk "1.8.0_20-b26" on amazon Linux?

我是 Linux 的新手,我需要在 AWS 的机器上安装 openjdk 1.8.0_20-b26(特定版本)。 如果您能提供一些提示,我将不胜感激,因为使用 yum 似乎总是安装最新的并且尝试使用 --showduplicates 没有任何结果。

非常感谢你的帮助。

打开JDK

查看您的存储库JDK中可用的

$ yum --showduplicates list java-1.8.0-openjdk-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.quelquesmots.fr
 * extras: ftp.rezopole.net
 * updates: centos.quelquesmots.fr
Available Packages
java-1.8.0-openjdk-devel.x86_64        1.8.0.20-3.b26.el6            ol6_latest
java-1.8.0-openjdk-devel.x86_64        1.8.0.25-1.b17.el6            ol6_latest
java-1.8.0-openjdk-devel.x86_64        1.8.0.25-3.b17.el6_6          ol6_latest
java-1.8.0-openjdk-devel.x86_64        1:1.8.0.31-1.b13.el6_6        ol6_latest
java-1.8.0-openjdk-devel.x86_64        1:1.8.0.45-28.b13.el6_6       ol6_latest
java-1.8.0-openjdk-devel.x86_64        1:1.8.0.45-35.b13.el6         ol6_latest
java-1.8.0-openjdk-devel.x86_64        1:1.8.0.51-0.b16.el6_6        ol6_latest
java-1.8.0-openjdk-devel.x86_64        1:1.8.0.51-1.b16.el6_7        ol6_latest
....

然后下载你需要的特定版本

对于 JRE

sudo yum install java-1.8.0-openjdk-1.8.0.20-3.b26.el6

包括JDK

sudo yum install java-1.8.0-openjdk-devel-1.8.0.20-3.b26.el6

甲骨文JDK

此版本也称为 JDK 8u20 (http://www.oracle.com/technetwork/java/javase/8all-relnotes-2226344.html#R180_20)

The full version string for this update release is 1.8.0_20-b26 (where "b" means "build"). The version number is 8u20..

您可以使用

下载此特定版本
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-linux-x64.tar.gz"