Step1:上传
[root@localhost /]
- 2、上传jdk压缩包
Step2:解压
[root@iZuf6c4gosw6jirlpgbp8eZ java]
[root@iZuf6c4gosw6jirlpgbp8eZ java]
Step3:添加环境变量(建议先备份)
[root@localhost ~]
JAVA_HOME=/usr/java/jdk1.8.0_192
JRE_HOME=/usr/java/jdk1.8.0_192/jre
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME JRE_HOME CLASS_PATH PATH
Step4:使配置文件生效
[root@localhost ~]
Step5:查看jdk配置是否成功
[root@iZuf6c4gosw6jirlpgbp8eZ jdk1.8.0_192]
[root@iZuf6c4gosw6jirlpgbp8eZ jdk1.8.0_192]