WASService コマンド行ツールを使用すると、 製品の Java プロセス用のサービスを作成することができます。
インストール・ウィザードで作成したサービスは、 アンインストーラー・プログラムで除去できます。WASService コマンドを 使用してご自身でサービスを作成する場合は、そのサービスが有効でなくなった際には、 お客様の責任において除去してください。アンインストーラー・プログラムは、お客様が WASService コマンドで作成したサービスは除去しません。
wasservice.sh コマンド・ファイルは、
app_server_root¥bin ディレクトリーにあります。
WASService.exe コマンド・ファイルは、
app_server_root¥bin ディレクトリーにあります。
コマンド構文は次のようになります。
wasservice.sh -start service_name [optional startServer.bat parameters]
WASService.exe -start service_name [optional startServer.bat parameters]
コマンド構文は次のようになります。
wasservice.sh -add service_name -serverName server_name -profilePath server_profile_directory [-wasHome app_server_root] [-startArgs additional_start_arguments] [-stopArgs additional_stop_arguments] [-userid user_id -password password]
WASService.exe -add service_name -serverName server_name -profilePath server_profile_directory [-wasHome app_server_root] [-configRoot configuration_repository_directory] [-startArgs additional_start_arguments] [-stopArgs additional_stop_arguments] [-userid user_id -password password] [-logFile service_log_file] [-logRoot server_log_directory] [-restart true | false] [-startType automatic | manual | disabled]
コマンド構文は次のようになります。
wasservice.sh -remove service_name
WASService.exe -remove service_name
コマンド構文は次のようになります。
wasservice.sh -stop service_name [optional stopServer.bat parameters]
WASService.exe -stop service_name [optional stopServer.bat parameters]
コマンド構文は次のようになります。
wasservice.sh -status service_name
WASService.exe -status service_name
コマンド構文は次のようになります。
WASService.exe -encodeParams service_name
インストール・ウィザードによって作成される サービスの名前は、IBM WebSphere Application Server V6.x - DefaultNode です。
サービスを表示するには、コントロール パネルを開き、「管理ツール」 >「サービス」をクリックします。情報を表示するにはサービスを選択します。サービスを右マウス・ボタンでクリックして、「プロパティー」をクリックします。4 つのタブが情報および機 能を提供します。例えば、「一般」 タブの「Setup type」フィールドを選択して、 セットアップ・タイプを変更します。
この例では、アプリケーション・サーバー・プロセスを開始する IBM WebSphere Application Server V6.x - name_of_the_application_server_service というサービスを作成します。
WASService -add name_of_the_application_server_service -servername application_server_name -profilePath profile_root -wasHome app_server_root -logFile profile_root¥logs¥WS_startServer.log -logRoot profile_root¥logs¥application_server_name -restart true各部の意味は、次のとおりです。
コマンドを入力した後、次の例と 同様のメッセージがコマンド・ウィンドウに表示されます。
Adding Service: name_of_the_application_server_service Config Root: profile_root¥config Server Name: application_server_name Profile Path: profile_root Was Home: app_server_root Start Args: Restart: 1 IBM WebSphere Application Server V6.x - name_of_the_application_server_service service successfully added.
Windows オペレーティング・システムのこの例では、別の stop 引数、ユーザー名、およびパスワードを持つ IBM WebSphere Application Server V6.x - Server2 Service という既存のサービスを更新します。 セキュリティーが使用可能になっているアプリケーション・サーバーを停止するためには stopServer コマンドではユーザー名とパスワードは必要ありません。 パラメーターは、Windows サービスがシステムをシャットダウンするために使用するスクリプトに自動的に渡されます。
WASService -add "Server2 Service" -servername server2 -profilePath profile_root -logRoot profile_root¥logs¥server2 -stopArgs "-username user_name -password password" -encodeParams
この Windows オペレーティング・システムの例では、server1 用の Windows サービスを作成した後に startServer server1 コマンドまたは stopServer server1 コマンドを実行すると、 以下の例と同様のメッセージが表示されます。
server1 は Windows サービスとして実行すると登録されているので 、このサーバーを開始する要求は、関連する Windows サービスを開始することによって実行されます。