Installing Java JRE on an Amazon Linux AMI

I am building my Apex environment and one of the requirements is to have Java JRE installed. I hate installing Java on Linux. The first thing to do is remove the Java version that is installed on a Amazon Linux image. The Java version is Java-openJDK and this may work but lets stick with Sun Java.

To un-install openJDK

yum erase java*

Now download the latest JRE for your environment from Java SE Downloads

mkdir /opt/software

cd /opt/software

upload the rpm / bin file to here I downloaded the jre-6u25-linux-x64-rpm.bin. The rpm file is easier to intstall

chmod 755 jre-6u25-linux-x64-rpm.bin


To ensure that the java path is always available

Navigate to the home folder of the user, in my case this is root and edit the .bash_profile


vi ~/.bash_profile

Insert the following line


The path obviously has to match where Java is installed.


To make this available to all users create a file in  /etc/profile.d


I am going to standardise on my


vi /etc/profile.d/




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s