1 下载
download
2 解压1
2cd /data/software/
tar -zxvf jdk-8u171-linux-x64.tar.gz
3 配置1
2
3
4vi /etc/profile
export JAVA_HOME=/data/software/jdk1.8.0_171
export PATH=$PATH:$JAVA_HOME/bin:
4 使其生效1
source /etc/profile
5 检查1
2
3
4[root@server1 jdk8]# java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)