WebSphere Application Server Network Deployment for i5/OS, Version 6.1   
             オペレーティング・システム: i5/OS

             目次と検索結果のパーソナライズ化

wsadmin スクリプト・クライアントの開始

wsadmin ツールを使用して、 WebSphere Application Server システムのほか、構成、アプリケーション・デプロイメント、 およびサーバーのランタイム操作も管理することができます。

このタスクについて

WebSphere Application Server wsadmin ツールは、スクリプトを実行することにより、 ご使用の環境の構成タスクを自動化する機能を提供します。 ただし、wsadmin ツールを使用する場合、以下のようないくつかの制限があります。
  • wsadmin ツールは、Jython および Jacl スクリプト言語のみをサポートします。 WebSphere Application Server のバージョン 6.1 リリースからは、 wsadmin ツールと関連付けられている Jacl 構文を非推奨とするプロセスが開始されています。 wsadmin ツール用の Jacl 構文は製品に残り、少なくとも 2 回の製品のメジャー・リリースの間はサポートされます。 その期間の後、Jacl 言語のサポートは wsadmin ツールから除去される可能性があります。wsadmin ツールの Jython 構文は、WebSphere Application Server 管理自動化の戦略的な方向です。V6.1 リリースの WebSphere Application Server には、製品の自動化と Jython 構文の使用をサポートする、大幅に拡張された管理機能とツールが含まれています。
  • wsadmin ツールは、同一またはそれ以上のバージョンの WebSphere Application Server がインストールされている、 アプリケーション・サーバーおよびデプロイメント・マネージャーのインストール、 構成、デプロイメントおよびランタイム操作を管理することができます。 wsadmin ツールは、 wsadmin ツールのバージョンより古いバージョンの製品を実行しているアプリケーション・サーバーまたはデプロイメント・マネージャーには接続できません。 例えば、バージョン 6.x wsadmin クライアントは、 バージョン 5.x アプリケーション・サーバーまたはデプロイメント・マネージャーには接続できません。 しかし、バージョン 5.x wsadmin クライアントは、 バージョン 6.x アプリケーション・サーバーまたはデプロイメント・マネージャーに接続することができます。 この制限が存在するのは、各製品リリースの wsadmin ツールに新機能が追加されているためです。 前の製品バージョンを実行中のアプリケーション・サーバーで新規コマンド機能を使用することはできません。

スクリプトを使用してほかのタスクを実行する前に、 wsadmin スクリプト・クライアントを開始する必要があります。

プロシージャー

  1. wsadmin スクリプト・クライアントを開始するコマンドを見つけます。
    以下から 1 つを選択します。
    • 特定のプロファイルを使用して、スクリプト・プロセスを起動します。 スクリプト・プロセスを起動する QShell コマンドは、 profile_root/bin ディレクトリー内にあります。 QShell スクリプトの名前は wsadmin です。 このオプションを使用する場合、-profileName profilename パラメーターを指定する必要はありません。
    • デフォルト・プロファイルを使用して、スクリプト・プロセスを起動します。 wsadmin Qshell コマンドは、app_server_root/bin ディレクトリー内にあります。 デフォルト・プロファイルに接続したくない場合は、-profileName profilename パラメーターを指定して使用したいプロファイルを示す必要があります。
  2. wsadmin スクリプト・クライアントを開始します。 wsadmin スクリプト・クライアントは、幾つかの異なる方法で開始することができます。 スクリプトを実行するための方法を指定するには、 以下のいずれかの wsadmin ツール・オプションを実行します。
    wsadmin スクリプト・クライアントを開始するためのオプション: 説明: 例:
    スクリプト・コマンドを対話式に実行します。

    wsadmin を、-f または -c 以外のオプションを指定するか、 オプションを指定しないで実行します。

    wsadmin プロンプトを備えた対話式シェルが表示されます。 wsadmin プロンプトから、任意の Jacl または Jython コマンドを入力します。 AdminControl、AdminApp、AdminConfig、AdminTask、または Help の各 wsadmin オブジェクトを使用して、 コマンドを呼び出すこともできます。

    対話式スクリプト・セッションを終了するには、 quit コマンドまたは exit コマンドを使用します。これらのコマンドは、引数を取りません。

    Jython を使用:
    wsadmin -lang jython

    デフォルトにより、セキュリティーは使用可能です:

    wsadmin -lang jython -user wsadmin -password wsadmin
    Jacl を使用:
    wsadmin

    セキュリティーが使用可能になっている場合:

    wsadmin -user wsadmin -password wsadmin

    出力例:

    Jython を使用した出力例は次のとおりです。
    WASX7209I: Connected to process server1 
    on node myhost using SOAP connector;  
    The type of process is: UnManagedProcess
    WASX7029I: For help, enter: "$Help help"
    wsadmin>print AdminApp.list()
    DefaultApplication¥nIBMUTC¥nivtApp¥nquery¥nsampleEAR
    wsadmin>exit
    Jacl example output:
    WASX7209I: Connected to process server1 
    on node myhost using SOAP connector;  
    The type of process is: UnManagedProcess
    WASX7029I: For help, enter: "$Help help"
    wsadmin>$AdminApp list
    adminconsole
    DefaultApplication
    ivtAppwsadmin>exit
    個別のコマンドとしてスクリプト・コマンドを実行します。

    -c オプションを指定して wsadmin ツールを実行します。

    Unix オペレーティング・システムでは、 wsadmin -c オプションを使用してドル記号 ($) を含むコマンドを起動すると、 コマンド行は変数置換を試みます。 この問題を回避するには、円記号 (¥) を使用してドル記号をエスケープします。 例えば、wsadmin -c "¥$AdminApp install ..." のようにします。 .

    Jython を使用:
    wsadmin -lang jython -c "AdminApp.list()"
    Jacl を使用:
    wsadmin -c "$AdminApp list"
    出力例:
    WASX7209I: Connected to process "server1" 
    on node myhost using SOAP connector;  
    The type of process is: UnManagedProcess
    adminconsole
    DefaultApplication
    ivtApp
    スクリプトでスクリプト・コマンドを実行します。

    -f オプションを指定して wsadmin ツールを実行し、 実行するコマンドをファイル内に配置します。

    Jython を使用:
    wsadmin -lang jython -f  al.py
    ここで、 al.py ファイルには、以下のコマンドが含まれます。
    apps = AdminApp.list()
    print apps
    出力例:
    WASX7209I: Connected to process "server1" 
    on node myhost using SOAP connector;  
    The type of process is: UnManagedProcess
    adminconsole
     DefaultApplication
     ivtApp
    プロファイル・スクリプトのスクリプト・コマンドを実行します。

    プロファイル・スクリプト とは、メイン・スクリプトの前、 または対話モードに入る前に実行するスクリプトです。 プロファイル・スクリプトを使用して、ユーザー用またはインストール・システム 用にカスタマイズされたスクリプト環境をセットアップすることができます。

    デフォルトでは、以下のプロファイル・スクリプト・ファイルが app_server_root/properties/wsadmin.properties ファイル内の com.ibm.ws.scripting.profiles プロファイル・プロパティーのために構成されます。
    app_server_root/bin/securityProcs.jacl
    app_server_root/bin/LTPA_LDAPSecurityProcs.jacl

    デフォルトではこれらのファイルは ASCII です。profile.encoding オプションを使用して EBCDIC でエンコードされたプロファイル・スクリプト・ファイルを実行する には、ファイルのエンコード方式を EBCDIC に変更します。

    プロファイル・スクリプトでスクリプト・コマンドを実行するには、-profile オプションを指定して wsadmin ツールを実行し、実行対象のコマンドをプロファイル・スクリプトに組み込みます。

    スクリプト環境をカスタマイズする場合は、1 つ 以上のプロファイル・スクリプトを実行するよう指定します。

    プロファイルを作成する際には、ノード名に括弧を使用しないでください。

    Jython を使用:
    wsadmin -lang jython -profile alprof.py
    ここで、 alprof.py ファイルには、以下のコマンドが含まれます。
    apps = AdminApp.list()
    print "Applications currently installed:¥n " + apps
    出力例:
    WASX7209I: Connected to process "server1" 
    on node myhost using SOAP connector;  
    The type of process is: UnManagedProcess
    Applications currently installed:
     adminconsole
     DefaultApplication
     ivtApp WASX7029I: For help, enter: "Help.help()"
     wsadmin>
    Jacl を使用:
    wsadmin -profile alprof.jacl
    ここで、 alprof.jacl ファイルには、以下のコマンドが含まれます。
    set apps [$AdminApp list]
    puts "Applications currently installed:¥n$apps"
    出力例:
    WASX7209I: Connected to process "server1" 
    on node myhost using SOAP connector;  
    The type of process is: UnManagedProcess
    Applications currently installed:
     adminconsole
     DefaultApplication
     ivtApp WASX7029I: For help, enter: "$Help help"
     wsadmin>



関連情報
Wsadmin ツール
タスク・トピック    

ご利用条件 | フィードバック

最終更新: Jan 21, 2008 8:28:52 PM EST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.nd.iseries.doc/info/iseriesnd/ae/txml_launchscript.html