Redhat Enterprise Linux 6.4 安裝Oracle JDK替換OpenJDK
缺省java版本為OpenJDK 1.7:
# java -version
java version "1.7.0_09-icedtea"
OpenJDK Runtime Environment (rhel-2.3.4.1.el6_3-x86_64)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)
# update-alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
安裝Oracle JDK 1.7:
# rpm -ivh /mnt/hgfs/pub/jdk-7u45-linux-x64.rpm
update-alternatives新增Oracle JDK 1.7:
# update-alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_45/bin/java 1
更改預設JDK版本:
# update-alternatives --config java
There are 3 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
3 /usr/java/jdk1.7.0_45/bin/java
Enter to keep the current selection[+], or type selection number: 3
There are 3 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
3 /usr/java/jdk1.7.0_45/bin/java
Enter to keep the current selection[+], or type selection number: 3
# java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
轉載: http://blog.sina.com.cn/s/blog_71d9aee40101qg03.html
相關文章
- Vmware linux redhat6.4 安裝11g(11.2.0.1) 雙節點RACLinuxRedhat
- Linux 解除安裝openjdk 安裝oraclejdkLinuxJDKOracle
- Linux下jdk的安裝解除安裝切換LinuxJDK
- Linux(01):RedHat 7.6 安裝LinuxRedhat
- Linux安裝JDKLinuxJDK
- redhat enterprise linux中vsftp開機自啟動RedhatLinuxFTP
- Red Hat Enterprise Linux Server 7.4 安裝LinuxServer
- [重慶思莊每日技術分享]-Redhat Linux 6.5安裝ORACLE ASMLIBRedhatLinuxOracleASM
- Linux安裝JDK流程LinuxJDK
- linux 下安裝 jdkLinuxJDK
- linux 解除安裝jdk和安裝LinuxJDK
- RedHat上靜默安裝Oracle11gRedhatOracle
- redhat7.2靜默安裝Oracle11.2.0.4RedhatOracle
- redhat7.6安裝Oracle11G RACRedhatOracle
- Oracle:Redhat 7 + Oracle RAC 11g 安裝 bug 總結OracleRedhat
- 【 Linux 軟體安裝 】- 1 JDK安裝LinuxJDK
- Linux安裝JDK1.8LinuxJDK
- Linux7安裝JDKLinuxJDK
- Linux安裝jdk環境LinuxJDK
- Linux 安裝 JDK17LinuxJDK
- 在Linux下安裝JDKLinuxJDK
- Linux安裝oracleLinuxOracle
- redhat安裝dockerRedhatDocker
- CentOS 7 - 安裝Oracle JDK8CentOSOracleJDK
- Linux伺服器---安裝jdkLinux伺服器JDK
- linux下安裝jdk1.8LinuxJDK
- Linux(CentOS)安裝JDK1.8LinuxCentOSJDK
- Linux(jdk+tomcat配置安裝)LinuxJDKTomcat
- CentOS Linux7 安裝JDKCentOSLinuxJDK
- Linux系統快速安裝JDKLinuxJDK
- Linux安裝JDK完整步驟LinuxJDK
- linux文字替換Linux
- Oracle 10g 在linux redhat as4 系統安裝圖解全過程Oracle 10gLinuxRedhat圖解
- linux中安裝JDK linux中安裝Tomcat linux中安裝Mysql 及故障解析 linux系統安裝redisLinuxJDKTomcatMySqlRedis
- 在Linux(Redhat/CentOS)下安裝MySQL之yum(rpm)線上安裝方式LinuxRedhatCentOSMySql
- 在Linux(Redhat/CentOS)下安裝MySQL之yum(rpm)離線安裝方式LinuxRedhatCentOSMySql
- RedHat 7 靜默安裝Oracle11g的補充RedhatOracle
- 【Linux】Centos7.6 安裝JDK 1.8LinuxCentOSJDK
- Ubuntu下安裝OpenJDK10UbuntuJDK