https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html

Centos JDK1.8 下载安装-LMLPHP

一  RPM包安装

rpm -ivh jdk-8u391-linux-x64.rpm
/etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0-x64
export PATH=$JAVA_HOME/bin:$PATH


source /etc/profile

二  tar.gz 包手动安装

tar -zxvf jdk-版本号-linux-架构.tar.gz

export JAVA_HOME=/usr/local/java/jdk-版本号  
export JRE_HOME=$JAVA_HOME/jre  
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib  
export PATH=$JAVA_HOME/bin:$PATH


source /etc/profile
03-30 11:23