Sun Java System Application Server Enterprise Edition 8.1 2005Q2 高可用性管理指南

啟動 HADB 管理代理程式

管理代理程式 ma 在 HADB 主機上執行管理指令,並透過在 HADB 節點管理員程序失敗時將其重新啟動,來確保其可用性。

對於生產部署,將管理代理程式做為服務啟動以確保其可用性。本小節提供了有關使用預設配置將管理代理程式做為服務啟動的簡短說明。

如需更多詳細資訊 (包括有關在主控台模式中啟動管理代理程式以進行測試或評估的說明,以及有關自訂其配置的資訊),請參閱使用 HADB 管理代理程式

本小節說明在使用 Java Enterprise System 時,如何使用預設配置將管理代理程式做為服務啟動。

Procedure在 Solaris 或 Linux 上使用 Java Enterprise System 啟動管理代理程式

  1. 建立與檔案 /etc/init.d/ma-initd 的以下符號連結︰


    /etc/rc0.d/K20ma-initd
    /etc/rc1.d/K20ma-initd
    /etc/rc2.d/K20ma-initd
    /etc/rc3.d/S99ma-initd
    /etc/rc5.d/S99ma-initd
    /etc/rcS.d/K20ma-initd
  2. 重新開機。

    若要關閉自動啟動和停止代理程式,請移除這些連結或將連結名稱中的字母 K 和 S 變更為小寫。

Procedure在 Windows 上使用 Java Enterprise System 啟動管理代理程式

  1. 開啟指令視窗。

  2. 輸入指令︰HADB_install_dir\bin\ma -i

    此指令可使用預設配置安裝並啟動管理代理程式。

接下來的步驟

若要停止管理代理程式並做為服務移除 (取消註冊),請使用以下指令:HADB_install_dir\bin\ma -r

Procedure在安裝了獨立應用程式伺服器的 Solaris 或 Linux 上啟動管理代理程式

  1. 在 shell 中,將目前目錄變更至 HADB_install_dir/bin

  2. 編輯 shell 程序檔 ma-initd

    替代程序檔中 HADB_ROOT 和 HADB_MA_CFG 的預設值以反映安裝︰

    • HADB_ROOT 為 HADB 安裝目錄 HADB_install_dir

    • HADB_MA_CFG 為管理代理程式配置檔案的位置。如需更多資訊,請參閱自訂管理代理程式配置

  3. ma-initd 複製至目錄 /etc/init.d

  4. 建立與檔案 /etc/init.d/ma-initd 的以下符號連結︰


    /etc/rc0.d/K20ma-initd
    /etc/rc1.d/K20ma-initd
    /etc/rc2.d/K20ma-initd
    /etc/rc3.d/S99ma-initd
    /etc/rc5.d/S99ma-initd
    /etc/rcS.d/K20ma-initd

Procedure在安裝了獨立應用程式伺服器的 Windows 上使用啟動管理代理程式

  1. 開啟指令視窗。

  2. 輸入指令︰HADB_install_dir\bin\ma -i ma.cfg

    現在,如果程序失敗或機器重新啟動,則管理代理程式將自動重新啟動。

接下來的步驟

若要停止管理代理程式並做為服務移除 (取消註冊),請使用以下指令:HADB_install_dir\bin\ma -r ma.cfg