jdk 安装包 https://pan.baidu.com/s/1cKnUQGU2Sk2nsARAzzVAHw
[root@localhost ~]# tar -zxvf jdk-8u152-linux-x64.tar.gz
[root@localhost ~]# mv jdk1.8.0_152/ /usr/local/java
[root@localhost ~]# vi /etc/profile
//末尾加入
export JAVA_HOME=/usr/local/java
export PATH=$PATH:$JAVA_HOME/bin
[root@localhost ~]# source /etc/profile
[root@localhost ~]# java –version
java version “1.8.0_152“ Java(TM) SE Runtime Environment (build 1.8.0_152-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)