地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2.然后解压缩到某个文件夹下,比如software
export JAVA_HOME=/home/xiaosiban/software/jdk1.8.0_121
export PATH=$PATH:$JAVA_HOME/bin
export JRE_HOME="$JAVA_HOME/jre"
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/rt.jar
保存文件
4.使用source /etc/profile 使配置的路径生效