CentOS 7 yum 安装与配置 JDK

参考https://blog.csdn.net/github_38336924/article/details/82221258
查找jdk

yum list installed | grep [java][jdk]
rpm -qa | grep [java][jdk][gcj]

卸载已存在jdk

yum -y remove java-1.6.0-openjdk*  //表时卸载所有openjdk相关文件输入
yum -y remove tzdata-java.noarch   //卸载tzdata-java

搜索yum源的jdk

yum search java | grep -i --color jdk

选择版本安装

yum install -y java-1.8.0-openjdk

你可能感兴趣的:(linux,centos,java)