この章のインストール、登録、および構成手順では、「シンプルな構成」で説明したシンプルな構成をインストールすることを想定しています。この節では、Sun Cluster HA for BEA WebLogic Server で選択できるほかの構成例を示します。
この構成では、START スクリプト startWebLogic.sh が、引数の指定なしに BEA WebLogic Server を起動できることが前提となります。BEA WebLogic Server を起動するのに必要な username と password は、この START スクリプトまたは boot.properties ファイルに構成できます。
# scrgadm -a -j bea-rs -t SUNW.wls- -g bea-rg \ -x Confdir_list=/global/bea/beahome/weblogic700 \ -x Server_url=http://logical_host1:7001 \ -x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh |
BEA WebLogic Server の START スクリプト startManagedWebLogic.sh が Managed Server 名を引数として使用する場合、拡張プロパティー Server_name を設定できます。START スクリプト startManagedWebLogic.sh を使用すると、複数の Managed Server を起動できます。START スクリプトに ADMIN_URL を構成する必要があります。BEA WebLogic Server を手動で起動するには、以下のコマンドを使用します。
cluster-node-1> cd /global/wls/user_projects/petstore cluster-node-1> ./startManagedWebLogic.sh petstore1 |
サーバー名 petstore1 を引数として使用する起動スクリプトを持つ Sun Cluster HA for BEA WebLogic Server リソースを構成するには、次のコマンドを使用します。
# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg \ -x Confdir_list=/global/bea/beahome/weblogic700 \ -x Server_url=http://logical_host1:7001 \ -x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh \ -x Server_name=petstore1 |
異なるサーバー petstore2 に同じ START スクリプトを使用する別の Sun Cluster HA for BEA WebLogic Server リソースを構成するには、以下のコマンドを使用します。
# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg \ -x Confdir_list=/global/bea/beahome/weblogic700 \ -x Server_url=http://logical_host1:7001 \ -x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh \ -x Server_name=petstore2 |
Sun Cluster HA for BEA WebLogic Server STOP メソッドは、デフォルトでは BEA WebLogic Server のプロセスを終了してインスタンスをシャットダウンします。このような動作が望ましくない場合は、Smooth_shutdown 拡張プロパティーを TRUE に設定して BEA WebLogic Server のスムーズなシャットダウンを有効にします。この拡張プロパティーを有効にしている場合は、WLS_USER と WLS_PW を START スクリプト内に設定する必要があります。この設定ではセキュリティー上で懸念がある場合は、Sun Cluster HA for BEA WebLogic Server によりデフォルトの強制的なシャットダウン (プロセスの終了) を行う必要があります。
スムーズにシャットダウンするリソースを構成するには、以下のコマンドを使用します。
# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg \ -x Confdir_list=/global/bea/beahome/weblogic700 \ -x Server_url=http://logical_host1:7001 \ -x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh \ -x Server_name=petstore1 \ -x Smooth_shutdown=TRUE |
Sun Cluster HA for BEA WebLogic Server はデータベースの状態を検査しません。Sun Cluster HA for BEA WebLogic Server の起動時にデータベースが停止していると、データサービスは開始されません。Sun Cluster HA for BEA WebLogic Server によってデータベースを検査したい場合は、独自のデータベース検証スクリプトを拡張プロパティーとして Sun Cluster HA for BEA WebLogic Server に渡すことができます。このデータベース検証は、正常に完了した場合にゼロを、失敗時にゼロ以外を返すものでなければなりません。
スクリプト拡張プロパティー DB_probe を設定してリソースを構成するには、以下のコマンドを使用します。
# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg \ -x Confdir_list=/global/bea/beahome/weblogic700 \ -x Server_url=http://logical_host1:7001 \ -x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh \ -x Server_name=petstore1 \ -x Smooth_shtudown=TRUE \ -x DB_probe_script=/global/bea/script/db_probe_script |
Sun Cluster HA for BEA WebLogic Server リソースを有効にして、リソースに構成されている BEA WebLogic Server のサービスを受ける URI を監視するには、次のコマンドを使用して、拡張プロパティー Monitor_uri_list を設定します。
# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg \ -x Confdir_list=/global/bea/beahome/weblogic700 \ -x Server_url=http://logical_host1:7001 \ -x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh \ -x Server_name=petstore1 \ -x Smooth_shutdown=TRUE \ -x DB_probe_script=/global/bea/script/db_probe_script \ -x Monitor_uri_list=http://logical_host1:7001/petstore,http://logical_host1:7001/bookstore |