CentOS7服务器JDK8安装实战
简介:演练JDK8环境的安装
下载jdk官网:
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
全局环境变量的配置文件:
vi /etc/profifile
export JAVA_HOME=/usr/local/jdk1.8 #这个路径要改,其余不需要改
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
加载环境变量:
source /etc/profifile
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)