# yum -y list java*
java-1.7.0-openjdk.x86_64 1:1.7.0.79-2.5.5.1.el6_6 updates
java-1.7.0-openjdk-demo.x86_64 1:1.7.0.79-2.5.5.1.el6_6 updates
java-1.7.0-openjdk-devel.x86_64 1:1.7.0.79-2.5.5.1.el6_6 updates
java-1.7.0-openjdk-javadoc.noarch 1:1.7.0.79-2.5.5.1.el6_6 updates
java-1.7.0-openjdk-src.x86_64 1:1.7.0.79-2.5.5.1.el6_6 updates
# yum -y install java-1.6.0-openjdk*
3.查看yum安装java结果,查看版本号
# java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (rhel-2.5.5.1.el6_6-x86_64 u79-b14)
OpenJDK 64-Bit Server VM (build 24.79-b02,mixed mode)
表示安装成功
原文链接:https://www.f2er.com/centos/380468.html表示安装成功