譯者註:本文是在Itanium64位RedhatAS5下測試的環境下測試,其實在其他和RedHat相容的系統比如CentOS也是一樣的可行的,譯者在32為CentOS6同樣成功的完成了任務。
Installing Sun JRE on RedHat Systems
在RedHat系統上安裝SunJRE
原文
DataStax recommends installing the mostrecently released version of the Oracle Sun Java Runtime Environment (JRE),also referred to as the Java Virtual Machine (JVM). Versions earlier than1.6.0_19 should not be used.
譯文
DataStax推薦安裝最新版本的Oracle Sun JRE,或是稱作Java虛擬機器,1.6.0_19以前的版本不能使用,必須是1.6.0_19及之後的JRE版本才能正常運行Cassandra1.0.x。
原文
The rpm packages install the OpenJDK JavaRuntime Environment (JRE) instead of the Oracle Sun JRE. After installing usingthe rpm packaged releases, configure your operating system to use the OracleSun JRE instead of OpenJDK.
譯文
作業系統初始安裝時預設安裝OpenJDK,所以我們必須安裝Oracle Sun 的JDK,並取代原來的OpenJDK。
原文
Check which version of the java runtimeenvironment your system is using. If your system is using the OpenJDK RuntimeEnvironment, you will need to change it to use the Oracle Sun JRE.
$ java -version
譯文
確認你得系統啟動並執行jre是哪個版本,假如你的系統使用的OpenJDK運行時,那麼必須重新安裝Oracle Sun 的JDK取代它。
$java –version
(譯者註:看看版本是否符合,如果已經符合就跳過安裝jre步驟)
原文
Go to the
Oracle JavaRuntime Environment Download Page, accept the license agreement, anddownload the Linux x64-RPM Installer or Linuxx86-RPM Installer (depending on yourplatform).
譯文
到Oracle Java運行環境下載頁面
(http://www.oracle.com/technetwork/java/javase/downloads/jre-6u25-download-346243.html)
下載Sun Jdk,選擇合適的版本,注意下載合適的rpm包,根據你的機器的CPU晶片和硬體選擇,比如是32的系統,那麼你下載的64為是安裝不了的
原文
Go to the directory where you downloadedthe JRE package, and change the permissions so the file is executable. Forexample:
$ cd /tmp
$ chmod a+x jre-6u25-linux-x64-rpm.bin
譯文
到你所下載的jre目錄,改變目錄的許可權,以便授權給其他使用者使用。
$ cd /tmp
$ chmod a+x jre-6u25-linux-x64-rpm.bin
原文
Extract and run the rpm file. For example:
$ sudo ./jre-6u25-linux-x64-rpm.bin
The rpm installs the JRE into /usr/java/.
譯文
解壓並運行rpm,比如:
$ sudo ./jre-6u25-linux-x64-rpm.bin
Rpm包將java運行環境安裝到了系統的/usr/java/目錄
原文
Configure your system so that it is usingthe Oracle Sun JRE instead of the OpenJDK JRE. Use the alternatives command toadd a symbolic link to the Oracle Sun JRE installation. For example:
$ sudo alternatives --install /usr/bin/java java /usr/java/jre1.6.0_25/bin/java 20000
譯文
配置系統預設的JRE,用OraclrSunJRE代替OpenJDK,使用alternatives命令配置系統的jdk把運行環境轉移帶OracleSun jre,例如:
$ sudo alternatives --install /usr/bin/java java /usr/java/jre1.6.0_25/bin/java 20000
原文
Make sure your system is now using thecorrect JRE. For example:
$ java -version
譯文
再次確認你得jre版本
$ java –version
原文
If the OpenJDK JRE is still being used, usethe alternatives command to switch it. For example:
$ sudo alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
1 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
*+ 2 /usr/java/jre1.6.0_25/bin/java
Enter to keep the current selection[+], or typeselection number: 2
譯文
假如OpenJDK仍然在使用中,那麼可以通過alternatives命令進行切換,比如:
$ sudo alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
1 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
*+ 2 /usr/java/jre1.6.0_25/bin/java
Enter to keep the current selection[+], or typeselection number: 2
譯者註:這時候應該是切換過來使用Oracle sun 的JRE了。