3.jdk配置(如果有openjdk最好卸了)
1)Scp上传各种包
2)解压包,放到指定目录下
tar -zxvf jdk-8u171-linux-x64.tar.gz
mkdir /usr/java
mv jdk1.8.0_171/ /usr/java/
3)环境配置jdk路径
vim /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_171
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:{JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
4)环境配置生效
source /etc/profile
5)验证是否生效
java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
网友评论