Website Download Address:
Http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u26-download-400750.html
Download and unzip the JDK and put it in the/usr/local directory:
TAR-XVF jdk-8u92-linux-x64.tar.gz
CD jdk1.8.0_92
chmod 755 Bin
Verify that the installation is successful:
[root@pcjdk1.8.0_92]#./bin/java-version
Java version "1.8.0_92"
Java (tm) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot (tm) 64-bit Server VM (bu ILD 25.92-b14, Mixed mode)
mv/download/jdk1.8.0_92/usr/local/
set up the JDK soft connection under/usr/local/to facilitate later version upgrade:
Ln-s/usr/local/jdk1.8.0_92//USR/LOCAL/JDK
To configure environment variables:
Add the following in/etc/profile:
java_home=/usr/local/jdk1.8.0_92
java_bin=/usr/local/jdk1.8.0_92/bin
path= $PATH: $JAVA _bin
Classpath= $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
export java_home java_bin PATH CLASSPATH
Save exit
[Root@master~]source/etc/profile
To see if the Java environment variable is in effect
[root@pclocal]# java-version
Javaversion "1.8.0_92"
Java (tm) SE Runtime Environment (build 1.8.0_92-b14)
Javahotspot (tm) 64-bit Server VM ( Build 25.92-b14, Mixed mode)
Test successful