centos7安装JDK8

centos7 安装JDK8
下载 jdk-8u201-linux-x64.tar.gz
tar -zxvf jdk-8u201-linux-x64.tar.gz
mv jdk1.8.0_201/ /usr/local
ln -s /usr/local/jdk1.8.0_201/ /usr/local/jdk
ln -s /usr/local/jdk1.8.0_201/ /usr/local/java

添加环境变量
vi /etc/profile

export JAVA_HOME=/usr/local/java
export PATH=$JAVA_HOME/bin:$PATH

source /etc/profile
验证 java -version

Leave a Comment