1.去Oracle官网下载linux版jdk
https://www.oracle.com/java/technologies/javase-downloads.htm
2.使用SecureFX上传jdk
3.解压jdk
tar -zxvf jdk-8u271-linux-x64.tar.gz -C /usr/local/
mv /usr/local/jdk1.8.0_271 /usr/local/java
4.配置java环境
1.进入配置文件
vi /ect/profile
2.在配置文件里加
export JAVA_HOME=/usr/loc