java 如何在亚马逊 Linux 上安装 openjdk“1.8.0_20-b26”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39249788/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install openjdk "1.8.0_20-b26" on amazon Linux?
提问by nadavy
I'm pretty new to Linux and I need to install openjdk 1.8.0_20-b26(that specific version) on a machine in AWS.
I'll appreciate if you could give some tips because it seems like using yum
always install the latest one and trying to use --showduplicates
yields nothing.
我对 Linux还很陌生,我需要在 AWS 的机器上安装 openjdk 1.8.0_20-b26(那个特定版本)。如果您能提供一些提示,我将不胜感激,因为似乎使用yum
总是安装最新的并尝试使用--showduplicates
没有任何结果。
I'll appreciate your help.
我会感谢你的帮助。
回答by Frederic Henri
Open JDK
打开 JDK
Review the available JDK from your repo
从您的存储库中查看可用的 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
....
and so download the specific version you need
所以下载你需要的特定版本
for the JRE
对于 JRE
sudo yum install java-1.8.0-openjdk-1.8.0.20-3.b26.el6
including the JDK
包括 JDK
sudo yum install java-1.8.0-openjdk-devel-1.8.0.20-3.b26.el6
Oracle JDK
甲骨文JDK
This releases is also known as JDK 8u20 (http://www.oracle.com/technetwork/java/javase/8all-relnotes-2226344.html#R180_20)
此版本也称为 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..
此更新版本的完整版本字符串是 1.8.0_20-b26(其中“b”表示“build”)。版本号是8u20..
you can download this specific version using
您可以使用下载此特定版本
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"