centos7 安裝jdk
安裝方式:rpm安裝,因為可能部分機子不連接外網,所以統一用rpm安裝
軟件:jdk-8u45-linux-x64.rpm
下載地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html
查看自帶java信息
[[email protected] ~]# java -version
java version "1.7.0_"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (rhel-1.45.1.11.1.el6-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
進一步查看JDK信息:
[[email protected]
javapackages-tools-3.4.1-6.el7_0.noarch
tzdata-java-2014i-1.el7.noarch
java-1.7.0-openjdk-headless-1.7.0.71-2.5.3.1.el7_0.x86_64
java-1.7.0-openjdk-1.7.0.71-2.5.3.1.el7_0.x86_64
python-javapackages-3.4.1-6.el7_0.noarch
卸載OpenJDK,執行以下操作:
[[email protected] ~]# rpm -e --nodeps tzdata-java-2014i-1.el7.noarch
[[email protected]