[Tutorial] How to install Java 8 on Linux CentOS 7 via SSH using PuTTY
[UPDATE: 07/16/2017 – Changed below description from Java 8 update 121 to Java 8 update 131, NOTE: THE VIDEO IS OUTDATED, ONLY THE DESCRIPTION IS CURRENT AS OF 07/16/2017. I will try to update as often as I can.)
In this tutorial, I show you how to install Java 8 on Linux CentOS 7 via SSH Terminal using PuTTY. Below will be the commands to use so that you can follow this tutorial.
STEP 01:
For 64Bit (Which is the version shown in the video)
# cd /opt/
# wget –no-cookies –no-check-certificate –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie” “http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz”
# tar xzf jdk-8u131-linux-x64.tar.gz
For 32Bit
# cd /opt/
# wget –no-cookies –no-check-certificate –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie” “http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-i586.tar.gz”
STEP 02: (Extracting the Archive)
# tar xzf jdk-8u131-linux-i586.tar.gz
**Note: If Above wget command does not work for you watch this example video to download java source archive using terminal.
{ https://www.youtube.com/watch?v=McuF7g14hYw }
STEP 03: (Installing with Alternatives)
# cd /opt/jdk1.8.0_131/
# alternatives –install /usr/bin/java java /opt/jdk1.8.0_131/bin/java 2
#alternatives –config java
In this example, there are 3 programs which provide ‘java’.
Selection Command
———————————————–
+ 1 /opt/jdk1.8.0_131/bin/java
* 2 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-3.b13.el7_2.x86_64/jre/bin/java
3 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.111-2.6.7.2.el7_2.x86_64/jre/bin/java
Press [ENTER] to keep the current selection (The one marked with a +), or type the selection number you want (In this case: 4).
STEP 4: (Checking Java Version)
#java -version
If successfully installed, you should see something similar as listed below:
java version “1.8.0_131”
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
That’s all! So you should now have Java Installed!
If you liked this video, then make sure you press that like button, or the dislike button if you hate me, yourself and the world.
Don’t forget to comment below with any questions, comments, suggestions, constructive criticism, tom-foolery or trolling.
As always in youtube land, If you’re not subscribed… SHAME ON YOU! So don’t forget to subscribe.
centos 7