上传、安装JDK
1.下载最新JDK官网下载
2.上传JDK压缩包到Linux/usr/local
目录下
cd /usr/local
tar -zxvf jdk-8u181-linux-x64.tar.gz
# 配置jdk环境变量
vi /etc/profile
export JAVA_HOME=/usr/local/java/jdk1.8.0_181
export JRE_HOME=/usr/local/java/jdk1.8.0_181/jre
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$PATH
# 刷新profile文件
source /etc/profile