1、rpm -ivh jdk-8u92-linux-x64.rpm
2. Environment variable configuration
#vi /etc/profile (add sudo in front of those without permission)
Add the following at the bottom of the profile
#export JAVA_HOME=/usr/java/jdk1.8.0_131
#export PATH=$JAVA_HOME/bin
#export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
3. Execute the following command to make the configuration take effect
#source /etc/profile
Uninstall jdk installed by rpm
1. rpm -qa|grep jdk to view the installed jdk
java-1.6.0-openjdk-1.6.0.0-11.1.13.4.el6.x86_64
jdk1.8.0_131-1.8.0_131-fcs.i586
java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el6_5.x86_64
2. Uninstall the installed jdk
rpm -e --nodeps jdk1.8.0_131-1.8.0_131-fcs.i586