Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I install java JDK on CentOS 5.4 using yum?

I have JRE only, but it's not enough.

share|improve this question

You can install the Java Development package group using

# yum groupinstall "Java Development"
share|improve this answer
FYI, this installs GCJ, not the Oracle/Sun JDK. Use yum groupinfo "Java Development" for more information. – Matt Solnit Jul 25 '10 at 22:28
And I'm getting JDK 1.4, instead of 1.5.. Can I get 1.5 somehow? – yegor256 Jul 26 '10 at 6:55
up vote 2 down vote accepted

I can't do it with yum. I had to do it manually, downloading JDK and installing it.

share|improve this answer

Download the JDK rpm-bin version, unpack it, wrap it into your own repository, add the repository to your CentOS and then install.

Or use yum localinstall RPM. Why did you ask this?

We do something along the above lines to be able to distribute JDK-Updates to all our CentOS servers using yum-cron.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.