1.上传jdk包
jdk-9.0.4_linux-x64_bin.tar.gz
2.解压
tar -zxvf jdk-9.0.4_linux-x64_bin.tar.gz
3.配置环境变量
vi /etc/profile
在末尾加上
#set java environment
JAVA_HOME=/usr/local/src/jdk/jdk-9.0.4
CLASSPATH=.:$JAVA_HOME/lib.tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
保存退出
使配置生效 source /etc/profile
java -version 查看是否安装完成
标签:bin,JAVA,jdk,tar,9.0,centos7,HOME,安装 From: https://www.cnblogs.com/imtm/p/16817105.html