Software Development

Install Oracle Java 8 in Red Hat Enterprise Linux and AWS EC2

This post demonstrates how to install Java (JDK) 8 in Red Hat Enterprise Linux in AWS EC2.

[wp_ad_camp_1]

Requirements

  • AWS Account
  • Email address
  • Provisioned EC2 instance with Red Hat Enterprise Linux AMI
  • Putty

Before proceeding, we need to perform the following steps:

Provision an EC2 Instance

This post will aid us in creating our server on AWS.

Provision a Server (EC2) on AWS

Convert .pem files to.pkk for putty

Convert the PEM files to a PPK files using PuttyGen

Installing Java (JDK) 8

Step 1: Install wget

Check if wget is already installed.

[wp_ad_camp_2]

If not, install it.

Use the following command:

When the installation completes, we’ll have this:

Step 2: Download JDK from Oracle

At the time of writing, the latest version of Java is 1.8.0_144. The following command will download that version of JDK to our EC2.

[wp_ad_camp_3]

When the download completes, we’ll have this:

Step 3: Extract and Copy to /opt

Use the following command to extract the contents of the .gz file.

[wp_ad_camp_4]

Then copy the extracted directory to /opt directory

Step 4: Add, or Update Symbolic Links

For java (executable):

For other executables or binaries.

[wp_ad_camp_5]

 

Loading

Got comments or suggestions? We disabled the comments on this site to fight off spammers, but you can still contact us via our Facebook page!.


You Might Also Like