Centos6.5安装jdk8

1 下载
download

2 解压

1
2
cd /data/software/
tar -zxvf jdk-8u171-linux-x64.tar.gz

3 配置

1
2
3
4
vi /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)