首先先下載並安裝 yum 的 repository
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm -Uhv rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
 
移除 1.5 的 java
yum remove java-1.5*
 
安裝 java 1.6
yum install java-1.6.0-openjdk.x86_64 -y
 
測試確認安裝成功
# java -version
java version "1.6.0_30"
OpenJDK Runtime Environment (IcedTea6 1.13.3) (rhel-5.1.13.3.el6_5-x86_64)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
Facebook 討論區載入中...