安装jdk
[jdk下载连接](https://www.oracle.com/java/technologies/downloads/)
创建 /usr/local/java 文件夹
将jdk压缩包上传至 /usr/local/java
解压 tar -zxvf jdk.x.x.x
vi /etc/profile
JAVA_HOME=/usr/local/java/jdk.x.x.x
CLASSPATH=$JAVA_HOME/lib/
PATH=$PATH:$JAVA_HOME/bin
export JRE_HOME=/usr/local/java/jdk.x.x.x/jre
export PATH JAVA_HOME_CLASSPATH
source /etc/profile
输入 java -version
出现 java version "1.8.0_151" 代表安装成功