Sun Java System Application Server Enterprise Edition 8.1 2005Q2 管理指南

在 UNIX 平台上自動重新啟動

若要在 UNIX 平台上重新啟動網域,請在 /etc/inittab 檔案中增加一行文字。

例如,若要重新啟動安裝在 opt/SUNWappserver 目錄中的 Application Server 之 domain1,請使用名為 password.txt 的密碼檔案:


das:3:respawn:/opt/SUNWappserver/bin/asadmin start-domain --user admin 
--passwordfile /opt/SUNWappserver/password.txt domain1

將這些文字放在一行上。前三個字母是程序的唯一指示符,可以進行更改。

重新啟動節點代理程式的語法與此相似。例如,若要重新啟動安裝在 opt/SUNWappserver 目錄中的 Application Server 之 agent1,請使用名為 password.txt 的密碼檔案:


das:3:respawn:/opt/SUNWappserver/bin/asadmin start-node-agent --user admin 
--passwordfile /opt/SUNWappserver/password.txt agent1