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.
- CentOS 5.x – this guide has been tested against 5.2
- root access
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
yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel