Installed JDK: jdk-8u102-linux-x64.rpm
Download address: http://pan.baidu.com/s/1mi8QZeK
Installation (JDK is installed by default in /usr/java)
[root@iZ94zsv4mnfZ ~]# rpm -ivh jdk-8u102-linux-x64.rpm
verify
[root@iZ94zsv4mnfZ ~]# java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
[root@iZ94zsv4mnfZ ~]#
Configure environment variables
[root@iZ94zsv4mnfZ ~]# Add the following at the
end of the vim /etc/profile file
export JAVA_HOME=/usr/java/jdk1.8.0_102
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
make the configuration take effect
[root@iZ94zsv4mnfZ ~]# source /etc/profile