Installing Java

Objective

Describe the required procedures to install Java.

Target audience

Intended for the OpMon administrators and the IT teams that after performing the OpMon installation, need to install Java as well.

Solution

1) Verifying older versions

To verify if already exists:

[root@opmon ~]# rpm -qa | grep java
glib-java-0.2.6-3.fc6
java-1.4.2-gcj-compat-1.4.2.0-40jpp.115

In this case, there is an unsupported version, you need to remove.

[root@opmon ~]# rpm -e glib-java-0.2.6-3.fc6 java-1.4.2-gcj-compat-1.4.2.0-40jpp.115

2) Installation procedures

Proceed with the installation via yum

[root@opmon ~]# yum install java -y
Loaded plugins:: dellsysid, downloadonly, fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
  * addons: centos.ufms.br
  * base: centos.pop.com.br
  * extras: centos.pop.com.br
  * updates: centos.pop.com.br
OpMon-base                                               |  951  B
OpMon-extras                                             |  951  B
addons                                                   |  951  B
base                                                     |  1.1 KB
extras                                                   |  2.1 KB
updates                                                  |  1.9 KB
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
--> Running transaction check
---> Package java-1.6.0-openjdk.i386 1:1.6.0.0-1.22.1.9.8.e15_6 set to be updated
--> Processing Dependency: libgif.so.4 for package: java-1.6.0-openjdk
--> Processing Dependency: tzdata-java for package: java-1.6.0-openjdk
--> Running transaction check
---> Package giflib.i386 0:4.1.3-7.3.3.e15 set to be updated
---> Package tzdata-java.i386 0:2011g-1.e15 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================
Package                  Arch        Version           Repository
================================================================
Installing:
  java-1.6.0-openjdk     i386  1:1.6.0.0-1.22.1.9.8.e15_6   updates
Installing for dependencies:
  giflib                 i386  4.1.3-7.3.3.e15              updates
  tzdata-java            i386    2011g-1.e15                updates
Transaction Summary
==================================================================
Install             3 Package (s)
Upgrade             0 Package (s)
Total download size: 38 M
Is this ok [y/N]: y
Downloading Packages
(1/3) : giflib-4.1.3-7.3.3.e15.i386.rpm                      |  39 KB
(2/3) : tzdata-java-2011g-1.e15.i386.rpm                     | 180 KB
(3/3) : java-1.6.0-openjdk-1.6.0.0-1.22.1.9.8.e15_6.i386.rpm  |  38 KB
-----------------------------------------------------------------------
Total                                               8.2 MB/s  |  38  KB
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction test Succeeded
Running Transaction
   Installing      :  tzdata-java
   Installing      :  giflib
   Installing      :  java-1.6.0-openjdk
Installed:
   java-1.6.0-openjdk.i386  1:1.6.0.0-1.22.1.9.8.e15_6
Dependency Installed:
   giflib.i386  0:4.1.3-7.3.3.e15         tzdata-java.i386   0:2011g-1.e15
Complete!

3) Testing

To test the version:

[root@opmon ~]# java-version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.8)  (rhel-1.22.1.9.8.e15_6-i386)
OpenJDK Server VM (build 19.0-b09, mixed mode)
Updated on 01/09/2021

Was this article helpful?

Ficou com alguma dúvida?

Perguntas & Respostas

Participe da nossa comunidade e tire dúvidas ou compartilhe respostas e ideias.

Participar

Professional Support

Não encontrou a resposta que procura? Não se preocupe, estamos aqui para ajudar!

Abrir chamado

Treinamento Online

Através da plataforma Udemy, você encontra todos os treinamentos das nossas soluções.

Inscreva-se