How to Install JDK in Linux using YUM

JDK

We can install Java using YUM command and also using RPM commands for Linux OS.

Lets see about installation of JDK using YUM.

 

In the Shell prompt, issue the command – # yum search jdk.

This will load all the JDK related packages with versions which are available to the configured rpm file.

# yum search jdk
Loaded plugins: priorities, update-motd, upgrade-helper
N/S matched: jdk ==========================================================
java-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.6.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentation
java-1.6.0-openjdk-src.x86_64 : OpenJDK Source Bundle
java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.7.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.7.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.7.0-openjdk-src.x86_64 : OpenJDK Source Bundle
java-1.8.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.8.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.8.0-openjdk-headless.x86_64 : OpenJDK Runtime Environment
java-1.8.0-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.8.0-openjdk-src.x86_64 : OpenJDK Source Bundle
ldapjdk-javadoc.noarch : Javadoc for ldapjdk
ldapjdk.noarch : The Mozilla LDAP Java SDK

Name and summary matches only, use "search all" for everything.

Now select the required packages for installation of Java, we are choosing install java-1.7.0-openjdk-devel.x86_64 & java-1.7.0-openjdk.x86_64

# yum install java-1.7.0-openjdk-devel.x86_64 java-1.7.0-openjdk.x86_64
Loaded plugins: priorities, update-motd, upgrade-helper
Package 1:java-1.7.0-openjdk-1.7.0.91-2.6.2.2.63.amzn1.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package java-1.7.0-openjdk-devel.x86_64 1:1.7.0.91-2.6.2.2.63.amzn1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================
Package Arch Version Repository Size
===================================================
Installing:
java-1.7.0-openjdk-devel x86_64 1:1.7.0.91-2.6.2.2.63.amzn1 amzn-updates 11 M
Transaction Summary
==================================================
Install 1 Package
Total download size: 11 M
Installed size: 36 M
Is this ok [y/d/N]: y
Downloading packages:
java-1.7.0-openjdk-devel-1.7.0.91-2.6.2.2.63.amzn1.x86_64.rpm | 11 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:java-1.7.0-openjdk-devel-1.7.0.91-2.6.2.2.63.amzn1.x86_64 1/1
Verifying : 1:java-1.7.0-openjdk-devel-1.7.0.91-2.6.2.2.63.amzn1.x86_64 1/1
Installed:
java-1.7.0-openjdk-devel.x86_64 1:1.7.0.91-2.6.2.2.63.amzn1
Complete!

[adAuto]
Next We will see about Installation of Java using RPM Method

YOU MAY ALSO LIKE....

Leave a Reply

1 Comment on "How to Install JDK in Linux using YUM"

avatar
166
Sort by:   newest | oldest | most voted
GalaPFacer
Guest

Hey there just wanted to give you a quick heads up and let you know a
few of the pictures aren’t loading properly.
I’m not sure why but I think its a linking issue. I’ve tried it in two different browsers and both show
the same outcome.

wpDiscuz