Installing Java 1.6 (OpenJDK) in CentOS 5.x from EPEL
Posted: April 7, 2011 Filed under: Linux, Open Source Leave a comment »I am posting this mini guide for those needing a quick guide in installing OpenJDK in CentOS 5.x.
The how-to information in CentOS community wiki sites explains how to build the rpms yourself from various JDK providers (IBM, Sun/Oracle, etc); but this is not what I wanted. What I wanted is to leverage existing yum repositories for CentOS, and this is where EPEL (Extra Packages for Enterprise Linux) comes to mind.
Requirements:
- CentOS 5.x – this guide has been tested against 5.2
- root access
- yum
Add EPEL to your yum repositories:
cd /tmp && wget -c http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-5-4.noarch.rpm
Install OpenJDK
yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel
Check java and javac versions
java -version
javac -version
You’re done!
Advertisement