Java Installation in RHEL
##Login as a root user sudo su - ##Change dir to /opt cd /opt |
yum install wget -y |
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm |
yum install jdk-8u131-linux-x64.rpm -y |
java -version
Install Java on Amazon Linux
- Run below commands to install Java 11 on Amazon Linux:
sudo amazon-linux-extras install java-openjdk11
- Run below commands to install Java 8 on Amazon Linux:
Check Java Version
java -version
Step 3 – Switch Java Version
alternatives --config java
Install Java on Ubuntu Linux
For Java 11
sudo apt update
sudo apt install openjdk-11-jdk
For Java 8
sudo apt update
sudo apt install openjdk-8-jdk
No comments:
Post a Comment