I needed Java on my Red Hat ES 5 x64 server here is how to install and configure this package on the server.
- Download the latest Java JDK package for your distribution from http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u26-download-400750.html
- Download the jdk-6u26-linux-x64-rpm.bin
- Switch to root and change permissions on the package, install it
su chmod 755 jdk-6u26-linux-x64.rpm.bin ./jdk-6u26-linux-x64.rpm.bin
- followup simple instruction on your screen, once installed you will need to edit your /etc/profile file
- run this command to open the /etc/profile file
gedit /etc/profile
- Once your /etc/profile opens you should add this to your file
JAVA_HOME=/usr/java/default; export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH; export PATH
- Save the file and log off and log on back to your system
- Once you are back in your system now you can check how the install went and what version of Java you have on your system
java -version
- If all is good you should see something similar on your screen 😉