1、查看当前linux系统是否安装了jdk
java -version
2、创建安装目录
mkdir /usr/local/jdk8
3、在创建的目录下用wget下载jdk
yum -y install wget
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
4、解压文件
tar -zxvf jdk-8u131-linux-x64.tar.gz
5、验证
java -version
java version "1.8.0_131"
Java