Installing Java 1.6 in CentOS 6 – The Simplest Way

Default repository in CentOS 6 will give you Java 1.5 JRE and SDK packages. I will show you on how to install version 1.6 using yum.  You just need to enable RPMforge repository and another simple steps required after that.

Variables as follow:

OS: CentOS 6 64bit
Current Java version: 1.5
Upgraded Java version: 1.6

1. Install RPMforge into yum repository:

$ cd /usr/local/src
$ rpm --import
$ wget
$ rpm -Uhv rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

2.  Remove previous Java version 1.5, if you have it installed:

$ yum remove java-1.5-*

3. Lets install Java 1.6. The package name will be java-1.6.0-openjdk.x86_64:

$ yum install java-1.6.0-openjdk.x86_64 -y

4. We need to export the JAVA_HOME environment. This steps is optional:

$ export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-

5. Lets check our latest Java version:

$ java -version
java version "1.6.0_17"
OpenJDK Runtime Environment (IcedTea6 1.7.9) (rhel-1.36.b17.el6_0-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

As simple as ABC!

Was this answer helpful?

 Print this Article

Also Read

ELS: Great Server Administration Tool

ELS stands for Easy Linux Security. ELS was created by Richard Gannon. ELS takes many...

How do I backup MySQL in Linux?

1. Copying from the mysql directoryBy default, MySQL databases on servers that use Linux are...

How do I RDNS Setup?

How do i setup rdns via Client Area Or . Before read...

Install Subversion (SVN) Server

Since programmers are already familiar with SVN instead of WebDAV, so I will need to setup a...

Run Command in Many Servers Simultaneously

Server administrators usually have many servers to manage. There will be some time when we need...

Powered by WHMCompleteSolution