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.
I'll appreciate your help.
答案 0 :(得分:9)
打开JDK
查看您的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
....
然后下载您需要的特定版本
用于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
Oracle JDK
此版本也称为JDK 8u20(http://www.oracle.com/technetwork/java/javase/8all-relnotes-2226344.html#R180_20)
此更新版本的完整版本字符串为1.8.0_20-b26(其中“b”表示“构建”)。版本号是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"