Saturday 28 September 2019

How to install Java8/jdk1.8 using yum command on Centos 7



By default Java packages are available in CentOS 7 base repositories and it can be installed using yum command. This article describes how to install Java8/jdk1.8 using yum command on CentOS 7.
Step 1. Run the following command to install Java8/jdk1.8:

[root@linuxcloudy ~]# yum install java
Loaded plugins: fastestmirror
………………………….
Installed:
  java-1.8.0-openjdk.x86_64 1:1.8.0.222.b10-1.el7_7

Dependency Installed:
  atk.x86_64 0:2.28.1-1.el7                                      avahi-libs.x86_64 0:0.6.31-19.el7                  cairo.x86_64 0:1.15.12-4.el7
  copy-jdk-configs.noarch 0:3.3-10.el7_5                         cups-libs.x86_64 1:1.6.3-40.el7                    dejavu-fonts-common.noarch 0:2.33-6.el7
……………………………
  python-javapackages.noarch 0:3.4.1-11.el7                      python-lxml.x86_64 0:3.2.1-4.el7                   ttmkfdir.x86_64 0:3.0.9-42.el7
  tzdata-java.noarch 0:2019c-1.el7                               xorg-x11-font-utils.x86_64 1:7.5-21.el7            xorg-x11-fonts-Type1.noarch 0:7.5-9.el7

Complete!
[root@linuxcloudy ~]#

Step 2. Verify the installation using the following command:

[root@linuxcloudy ~]# java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
[root@linuxcloudy ~]#

Done!!! Java 8 installation is done.

No comments:

Post a Comment