Install AdoptOpenJDK 11 in the environment where CentOS-8.1.1911-x86_64 is installed by "minimum installation".
vi /etc/yum.repos.d/adoptopenjdk.repo
adoptopenjdk.repo
[AdoptOpenJDK]
name=AdoptOpenJDK
baseurl=http://adoptopenjdk.jfrog.io/adoptopenjdk/rpm/centos/8/x86_64
enabled=1
gpgcheck=1
gpgkey=https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public
dnf list adoptopenjdk*
It will be displayed as follows.
CentOS-8 - AppStream 7.2 kB/s | 4.3 kB 00:00
CentOS-8 - Base 9.0 kB/s | 3.8 kB 00:00
CentOS-8 - Extras 4.2 kB/s | 1.5 kB 00:00
AdoptOpenJDK 93 kB/s | 332 kB 00:03
packages-microsoft-com-mssql-server-2019 8.8 kB/s | 3.0 kB 00:00
Available packages
adoptopenjdk-11-hotspot.x86_64 11.0.7+10-1 AdoptOpenJDK
adoptopenjdk-11-hotspot-jre.x86_64 11.0.7+10-1 AdoptOpenJDK
adoptopenjdk-11-openj9.x86_64 11.0.7+10.openj9_0.20.0-1 AdoptOpenJDK
adoptopenjdk-11-openj9-jre.x86_64 11.0.7+10.openj9_0.20.0-1 AdoptOpenJDK
adoptopenjdk-11-openj9xl.x86_64 11.0.7+10.openj9_0.20.0-1 AdoptOpenJDK
adoptopenjdk-11-openj9xl-jre.x86_64 11.0.7+10.openj9_0.20.0-1 AdoptOpenJDK
adoptopenjdk-12-hotspot.x86_64 12.0.2+10-1 AdoptOpenJDK
adoptopenjdk-12-hotspot-jre.x86_64 12.0.2+10-1 AdoptOpenJDK
adoptopenjdk-12-openj9.x86_64 12.0.2+10-1 AdoptOpenJDK
adoptopenjdk-12-openj9-jre.x86_64 12.0.2+10-1 AdoptOpenJDK
adoptopenjdk-12-openj9xl.x86_64 12.0.2+10-1 AdoptOpenJDK
adoptopenjdk-12-openj9xl-jre.x86_64 12.0.2+10-1 AdoptOpenJDK
adoptopenjdk-13-hotspot.x86_64 13+33-1 AdoptOpenJDK
adoptopenjdk-13-hotspot-jre.x86_64 13+33-1 AdoptOpenJDK
adoptopenjdk-13-openj9.x86_64 13+33-1 AdoptOpenJDK
adoptopenjdk-13-openj9-jre.x86_64 13+33-1 AdoptOpenJDK
adoptopenjdk-13-openj9xl.x86_64 13+33-1 AdoptOpenJDK
adoptopenjdk-13-openj9xl-jre.x86_64 13+33-1 AdoptOpenJDK
adoptopenjdk-14-hotspot.x86_64 14.0.1+7-1 AdoptOpenJDK
adoptopenjdk-14-hotspot-jre.x86_64 14.0.1+7-1 AdoptOpenJDK
adoptopenjdk-14-openj9.x86_64 14.0.1+7-1 AdoptOpenJDK
adoptopenjdk-14-openj9-jre.x86_64 14.0.1+7-1 AdoptOpenJDK
adoptopenjdk-14-openj9xl.x86_64 14.0.1+7-1 AdoptOpenJDK
adoptopenjdk-14-openj9xl-jre.x86_64 14.0.1+7-1 AdoptOpenJDK
adoptopenjdk-8-hotspot.x86_64 8u252_b09-1 AdoptOpenJDK
adoptopenjdk-8-hotspot-jre.x86_64 8u252_b09-1 AdoptOpenJDK
adoptopenjdk-8-openj9.x86_64 8u252_b09.openj9_0.20.0-1 AdoptOpenJDK
adoptopenjdk-8-openj9-jre.x86_64 8u252_b09.openj9_0.20.0-1 AdoptOpenJDK
adoptopenjdk-8-openj9xl.x86_64 8u252_b09.openj9_0.20.0-1 AdoptOpenJDK
adoptopenjdk-8-openj9xl-jre.x86_64 8u252_b09.openj9_0.20.0-1 AdoptOpenJDK
dnf -y install adoptopenjdk-11-hotspot.x86_64
Final confirmation of metadata expiration: 0:00:It was held 51 hours ago on April 16, 2020 at 15:46:53.
The dependency has been resolved.
================================================================================
Package Arch version repository size
================================================================================
Installation:
adoptopenjdk-11-hotspot x86_64 11.0.7+10-1 AdoptOpenJDK 185 M
Dependency installation:
alsa-lib x86_64 1.1.9-4.el8 AppStream 429 k
libX11 x86_64 1.6.7-1.el8 AppStream 612 k
libX11-common noarch 1.6.7-1.el8 AppStream 157 k
libXau x86_64 1.0.8-13.el8 AppStream 36 k
libXext x86_64 1.3.3-9.el8 AppStream 45 k
libXi x86_64 1.7.9-7.el8 AppStream 49 k
libXrender x86_64 0.9.10-7.el8 AppStream 33 k
libXtst x86_64 1.2.3-7.el8 AppStream 22 k
libxcb x86_64 1.13-5.el8 AppStream 230 k
Transaction overview
================================================================================
Installation 10 packages
Total download size: 186 M
Installed size: 315 M
Download package:
(1/10): libX11-common-1.6.7-1.el8.noarch.rpm 1.0 MB/s | 157 kB 00:00
(2/10): libXau-1.0.8-13.el8.x86_64.rpm 879 kB/s | 36 kB 00:00
(3/10): alsa-lib-1.1.9-4.el8.x86_64.rpm 2.1 MB/s | 429 kB 00:00
(4/10): libXext-1.3.3-9.el8.x86_64.rpm 1.9 MB/s | 45 kB 00:00
(5/10): libXi-1.7.9-7.el8.x86_64.rpm 2.2 MB/s | 49 kB 00:00
(6/10): libXrender-0.9.10-7.el8.x86_64.rpm 1.5 MB/s | 33 kB 00:00
(7/10): libXtst-1.2.3-7.el8.x86_64.rpm 252 kB/s | 22 kB 00:00
(8/10): libxcb-1.13-5.el8.x86_64.rpm 1.2 MB/s | 230 kB 00:00
(9/10): libX11-1.6.7-1.el8.x86_64.rpm 392 kB/s | 612 kB 00:01
(10/10): adoptopenjdk-11-hotspot-11.0.7+10-1.x8 913 kB/s | 185 MB 03:27
--------------------------------------------------------------------------------
Total 919 kB/s | 186 MB 03:27
warning: /var/cache/dnf/AdoptOpenJDK-99841c35d41dcef2/packages/adoptopenjdk-11-hotspot-11.0.7+10-1.x86_64.rpm:Header V4 RSA/SHA1 Signature, key ID 74885c03: NOKEY
AdoptOpenJDK 3.6 kB/s | 3.1 kB 00:00
Importing GPG key 0x74885C03:
Userid : "AdoptOpenJDK (used for publishing RPM and DEB files) <[email protected]>"
Fingerprint: 8ED1 7AF5 D7E6 75EB 3EE3 BCE9 8AC3 B291 7488 5C03
From : https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public
The key was successfully imported
Performing transaction confirmation
The transaction was confirmed successfully.
Running transaction test
You have successfully tested the transaction.
Transaction is in progress
Preparation: 1/1
During installation: libXau-1.0.8-13.el8.x86_64 1/10
During installation: libxcb-1.13-5.el8.x86_64 2/10
During installation: libX11-common-1.6.7-1.el8.noarch 3/10
During installation: libX11-1.6.7-1.el8.x86_64 4/10
During installation: libXext-1.3.3-9.el8.x86_64 5/10
During installation: libXi-1.7.9-7.el8.x86_64 6/10
During installation: libXtst-1.2.3-7.el8.x86_64 7/10
During installation: libXrender-0.9.10-7.el8.x86_64 8/10
During installation: alsa-lib-1.1.9-4.el8.x86_64 9/10
scriptlet running: alsa-lib-1.1.9-4.el8.x86_64 9/10
During installation: adoptopenjdk-11-hotspot-11.0.7+10-1.x86_64 10/10
scriptlet running: adoptopenjdk-11-hotspot-11.0.7+10-1.x86_64 10/10
Verification: alsa-lib-1.1.9-4.el8.x86_64 1/10
Verification: libX11-1.6.7-1.el8.x86_64 2/10
Verification: libX11-common-1.6.7-1.el8.noarch 3/10
Verification: libXau-1.0.8-13.el8.x86_64 4/10
Verification: libXext-1.3.3-9.el8.x86_64 5/10
Verification: libXi-1.7.9-7.el8.x86_64 6/10
Verification: libXrender-0.9.10-7.el8.x86_64 7/10
Verification: libXtst-1.2.3-7.el8.x86_64 8/10
Verification: libxcb-1.13-5.el8.x86_64 9/10
Verification: adoptopenjdk-11-hotspot-11.0.7+10-1.x86_64 10/10
Installation complete:
adoptopenjdk-11-hotspot-11.0.7+10-1.x86_64 alsa-lib-1.1.9-4.el8.x86_64
libX11-1.6.7-1.el8.x86_64 libX11-common-1.6.7-1.el8.noarch
libXau-1.0.8-13.el8.x86_64 libXext-1.3.3-9.el8.x86_64
libXi-1.7.9-7.el8.x86_64 libXrender-0.9.10-7.el8.x86_64
libXtst-1.2.3-7.el8.x86_64 libxcb-1.13-5.el8.x86_64
Has completed!
update-alternatives --config java
There is one program'java'To provide.
Select command
-----------------------------------------------
*+ 1 /usr/lib/jvm/adoptopenjdk-11-hotspot/bin/java
Press Enter to select the current[+]Or enter the selection number:1
Select 1.
java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
You have successfully installed it.
Recommended Posts