jdk1.8部署
JDK1.8
linux下安装jdk1.8
解压:
tar xf jdk-8u211-linux-x64.tar.gz
软连接:
ln -s /data/jdk1.8.0_211 /data/jdk1.8
添加环境变量
vim /etc/profile.d/jdk1.8.sh
export JAVA_HOME=/data/jdk1.8
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
加载
source /etc/profile.d/jdk1.8.sh
验证
java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)