[LINUX] Install Adopt OpenJDK 11 on Cent OS 8

Introduction

Install AdoptOpenJDK 11 in the environment where CentOS-8.1.1911-x86_64 is installed by "minimum installation".

Yum repository creation

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

Confirmation of settings and options

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

Installation

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!

Setting

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.

Verification

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)

Summary

You have successfully installed it.

Recommended Posts

Install Adopt OpenJDK 11 on Cent OS 8
Install tomcat 9 on Cent OS 8
Install Python 3.8 on Ubuntu 18.04 (OS standard)
Install Python 3.8 on Ubuntu 20.04 (OS standard)
Install Sphinx on Mac OS X
Install Scipy on Mac OS Sierra
Install mitmproxy on Mac OS X
Install Python 3.9 on Ubuntu 20.04 (OS standard?)
Install Python 2.7 on Ubuntu 20.04 (OS standard?)
Install pgmagick on Mac OS X 10.9
Install matplotlib on OS X El Capitan
Install 64-bit OS (bate) on Raspberry Pi
Install docker-compose on 64-bit Raspberry Pi OS
Install the latest version of Apache httpd 2.4 from source on Cent OS 8
Easy way to use Python 2.7 on Cent OS 6
Install mecab on Marvericks
Install Tensorflow on Mac
Install python on WSL
Install Faiss on CentOS 7
Install pip on Mavericks
Install Python on Pidora.
Install mongodb on termux
Build onboard RAID with T1310M3 and install Cent OS 7.7
Install docker on Fedora31
Install numba on CentOS 7.2
Install Ansible on Mac
Very easy to install SciPy on Mac OS X
Install Python on Mac
How to install caffe on OS X with macports
Install Python 3 on Mac
Install Plone (4.3.6) on MacOSX (10.10.3)
Install PySide2 on Ubuntu
Install Python3.4 on CentOS 6.6
Install gensim on Marvericks
Install JModelica on Ubuntu
Install Anaconda on Windows 10
Install and develop Git, VSCode, Docker on Chrome OS
Install numpy on Marvericks
Install python on windows
Install PyQt5 with homebrew on Mac OS X Marvericks (10.9.2)
Install enebular-agent on Chromebook
Install pycuda on Windows10
Install mecab-python on CentOS
Install Python 2.7.3 on CentOS 5.4
Install aws-cli on MacPorts
Install pygraphviz on Windows 10
Install Docker on AWS
Install Python 3.3 on Ubuntu 12.04
Install Chainer 1.5.0 on Windows
Install Python 3.4 on Mac
Install Caffe on Mac
Install Theano on Ubuntu 12.04
Install pyenv on OSX
Install mecab on mac
Install awscli on centos7
Install angr on Ubuntu 18.04
Install Chainer on CentOS 6.7
Install mecab-python on Mac
Install pip / pip3 on Ubuntu
Install Python 3.6 on Docker
How to integrate Apache httpd 2.4 and Tomcat 9 on Cent OS 8