前へ     目次     索引     DocHome     次へ     
iPlanet Web Server, Enterprise Edition 管理者ガイド



付録 A   コマンド行ユーティリティ


この付録では、ユーザインタフェース画面の代わりにコマンド行ユーティリティを使用する方法を説明します。

この付録は、次の節で構成されています。



LDIF エントリの書式設定

LDIF は、空白行で区切られた 1 つ以上のディレクトリエントリで構成されます。各 LDIF エントリはオプションエントリ ID、要求される識別名、1 つ以上のオブジェクトクラス、複数の属性定義で構成されます。

LDIF エントリの書式設定についての詳細は、http://docs.iplanet.com/docs/manuals/directory.html から iPlanet Directory Server 5.0 の『構成、コマンド、およびファイルのリファレンス』または『Netscape Schema Reference, Directory Server 4.0』を参照してください。


ldapmodify を使用したデータベースエントリの修正

ldapmodify コマンド行ユーティリティを使用して、既存のディレクトリサーバデータベース内のエントリを修正します。ldapmodify では、入力された識別名とパスワードを使用して、指定されたサーバへの接続を開き、指定されたファイルに含まれている LDIF 更新文に基づいてエントリを修正します。ldapmodify は LDIF 更新文を使用しているため、ldapmodifyldapdelete で実行できることをすべて実行できます。

ディレクトリサーバのデータベースエントリで使用されるコマンド行ユーティリティについての詳細は、http://docs.iplanet.com/docs/manuals/directory.html の iPlanet Directory Server 5.0 の『構成、コマンド、およびファイルのリファレンス』または『Netscape Schema Reference, Directory Server 4.0』を参照してください。



HttpServerAdmin (仮想サーバの管理)



HttpServerAdmin は、Server Manager と Class Manager での仮想サーバのユーザインタフェースと同じ管理機能を実行するコマンド行ユーティリティです。コマンド行インタフェースを使用して仮想サーバを設定する場合は、HttpServerAdmin を使用します。

HttpServerAdminserver_root/bin/https/httpadmin/bin 内にあります。

HttpServerAdmin を実行するには、使用している環境でサーバのルートディレクトリに環境変数 IWS_SERVER_HOME を設定する必要があります。

たとえば、UNIX/Linux システムでは、次のように設定します。

setenv IWS_SERVER_HOME /usr/iplanet/servers

Windows NT の場合は、次のようにして設定します。

  1. 「コントロールパネル」で「システム」を選択します。

  2. 「環境」タブをクリックします。

  3. 「変数」フィールドに「IWS_SERVER_HOME」、「値」フィールドにサーバルートへのパスを入力します。

  4. 「設定」をクリックします。

  5. 「OK」をクリックします。



    すべてのコマンドを実行するには、仮想サーバの情報が格納されるファイル server.xml への書き込み権限が必要です。




HttpServerAdmin の構文

HttpServerAdmin の構文を以下に示します。

HttpServerAdmin command_name command_options -d server_root -sinst http_instance

次のコマンドを入力すると、コマンドパラメータのオンラインヘルプを参照できます。

./HttpServerAdmin -h

command_name パラメータとして使用可能な 4 つの値は、次のとおりです。

  • control

  • create

  • delete

  • list

各コマンドには、独自のコマンドオプションのセットがあります。詳細については、この章の各コマンドについて説明している節を参照してください。

コマンドパラメータの値に関わらず、表 A-1 に表示されるパラメータは、HttpServerAdmin コマンドのすべての使用に適用できます。


表 A-1    HttpServerAdmin パラメータ

パラメータ

-d server_root  

(必須)。このパラメータはサーバルート (サーバがインストールされている場所) へのパスを指定する  

-sinst http_instance  

(必須)。このパラメータは、HttpServerAdmin によって影響を受けるインスタンスを指定する  


control コマンド

control コマンドを使用して、クラスと仮想サーバの開始、停止、無効化を実行します。仮想サーバを指定しない場合、クラス内のすべての仮想サーバに対してコマンドの開始、停止、または無効化を行います。


オプション

表 A-2 に示すオプションとともに control コマンドを使用すると、クラスと仮想サーバを制御できます。


表 A-2    Control コマンドのオプション

オプション

-start  

指定された仮想サーバを開始する。仮想サーバが指定されていない場合は、クラス内のすべての仮想サーバを開始する  

-stop  

指定された仮想サーバを停止する。仮想サーバが指定されていない場合は、クラス内のすべての仮想サーバを停止する  

-disable  

指定された仮想サーバを無効化する。仮想サーバが指定されていない場合は、クラス内のすべての仮想サーバを無効化する  


構文

HttpServerAdmin control -cl classname, -control_option [-id virtual_server] -d server_root -sinst http_instance


パラメータ

これらのパラメータをコマンドオプションとともに使用して、仮想サーバを制御します。


表 A-3    Control コマンドのパラメータ

パラメータ

-cl classname  

仮想サーバクラスを指定する  

-id virtual_server  

(省略可能) 制御している仮想サーバの ID を指定する  





HttpServerAdmin control -cl myclass -start -id myvirtualserver -d /usr/iplanet/servers -sinst https-iplanet.com

HttpServerAdmin control -cl myclass -stop -id myvirtualserver -d /usr/iplanet/servers -sinst https-iplanet.com

HttpServerAdmin control -cl myclass -disable -id myvirtualserver -d /usr/iplanet/servers -sinst https-iplanet.com


create コマンド

create コマンドを使用して、仮想サーバのクラス、仮想サーバ、待機ソケット、接続グループを作成します。


オプション

表 A-4 に示すオプションとともに create コマンドを使用すると、クラス、接続グループ、待機ソケット、および仮想サーバを作成できます。


表 A-4    create コマンドのオプション

オプション

-c  

仮想サーバクラスを作成する  

-g  

接続グループを作成する  

-l  

待機ソケットを作成する  

-v  

仮想サーバを作成する  

オプションにはそれぞれパラメータがあります。次の節で各パラメータについて説明します。


仮想サーバクラスの作成

create コマンドのこのオプションを使用して、仮想サーバクラスを作成します。


構文
HttpServerAdmin create -c -cl classname [-docroot document_root] [-obj obj.conf_file] [-acptlang accept_language] -d server_root -sinst http_instance


パラメータ
表 A-5 に示すパラメータを create -c コマンドオプションとともに使用し、クラスを作成します。


表 A-5    仮想サーバクラス作成のパラメータ 

パラメータ

-cl classname  

作成するクラス名  

-docroot document_root  

(省略可能) クラスのドキュメントルート。これは絶対パスにする必要がある  

-obj obj.conf_file  

(省略可能) クラスの obj.conf ファイル。このパラメータを指定しない場合、サーバは classname.obj.conf という名前で obj.conf ファイルを作成する。クラスの obj.conf ファイルに別の名前を付ける場合は、ここで指定する  

-acptlang accept_language  

(省略可能) このパラメータを指定しない場合、acptlang はデフォルトでオフ  




HttpServerAdmin create -c -cl myclass1 -d /export/iplanet/servers -sinst https-iplanet.com


接続グループの作成

create コマンドのこのオプションを使用して、接続グループを作成します。


構文
HttpServerAdmin create -g group_ID -lsid listen_socket -ip IPaddress -sname server_name -defaultvs default_virtual_server -d server_root -sinst http_instance


パラメータ
表 A-6 に示すパラメータを create -g コマンドオプションとともに使用し、接続グループを作成します。


表 A-6    接続グループ作成のパラメータ 

パラメータ

-g connection_group  

作成する接続グループの ID  

-lsid listen_socket  

この接続グループに関連付けられる待機ソケットの ID  

-ip IP_address  

この接続グループに関連付けられた IP アドレス  

-sname server_name  

サーバ名  

-defaultvs default_virtual_server  

要求された URL ホストが見つからない場合、接続グループが接続するデフォルトの仮想サーバ  




HttpServerAdmin create -g conngroup2 -lsid ls1 -ip 1.1.1.1 -sname iplanet -defaultvs vs2 -d server_root -sinst https-iplanet.com


待機ソケットの作成

create コマンドのこのオプションを使用して、待機ソケットを作成します。


構文
HttpServerAdmin create -l -id listen-socket -ip ip_address -port port_number -sname server_name -defaultvs default_virtual_server [-sec security] [-acct number_of_accept_threads] -d server_root -sinst http_instance


パラメータ
表 A-7 に示すパラメータを create -l コマンドオプションとともに使用し、待機ソケットを作成します。


表 A-7    待機ソケット作成のパラメータ 

パラメータ

-id listen-socket  

作成する待機ソケットの ID  

-ip ip_address  

待機ソケットの IP アドレス  

-port port_number  

待機ソケットのポート番号  

-sname server_name  

待機ソケットに関連付けるサーバ名  

-defaultvs default_virtual_server  

デフォルトの仮想サーバの ID。待機ソケットを作成できるようにするには、この仮想サーバがすでに存在することが必要  

-acct number_of_accept_threads  

(省略可能) 待機ソケットの受け入れスレッド数  

-sec on  

(省略可能) 指定されている場合は、待機ソケットに対するセキュリティを有効にするために使用する。指定されていない場合は、セキュリティが有効になっていない  




HttpServerAdmin create -l -id ls3 -ip 0.0.0.0 -port 1333 -sname austen -defaultvs vs2 -sec on -acct 4 -d /export/carey/server6 -sinst https-austen.com


仮想サーバの作成

create コマンドのこのオプションを使用して、仮想サーバを作成します。

省略可能なパラメータの一部に値を指定しない場合、デフォルト値が使用されます。仮想サーバが作成されたあと、いつでもデフォルト値を変更することができます。


構文
HttpServerAdmin create -v -id virtual_server -cl classname -urlh urlhosts -conngroupid connection_group_ID[-state state][-docroot document_root] [-mime mime_types_file] [-aclid acl_ID] -d server_root -sinst http_instance


パラメータ
表 A-8 に示すパラメータを create -v コマンドオプションとともに使用し、仮想サーバを作成します。


表 A-8    仮想サーバ作成のパラメータ 

パラメータ

-id virtual_server  

作成する仮想サーバの ID  

-cl classname  

仮想サーバがメンバーとなるクラス  

-urlh URL_hosts  

仮想サーバの URL ホスト。コンマで区切ることによって、複数の URL ホストを指定できる  

-conngroupid connection_group_ID  

待機ソケットの接続グループ  

-state state  

(省略可能) 有効な値は、「on」、「off」、および「disable」  

-docroot document_root  

(省略可能) 仮想サーバのドキュメントルートを指定する場合は、このパラメータを使用する。絶対パスを指定することが必要  

-mime mime_types_file  

(省略可能) 仮想サーバの MIME タイプのファイル名  

-aclid acl_ID  

(省略可能) server.xml ファイルで使用される ACL ファイルの ID <ACLID>  




HttpServerAdmin create -v -id vs3 -cl class1 -urlh annh -conngroupid group1 -d /export/iplanet/server6 -sinst https-iplanet.com

HttpServerAdmin create -v -id vs4 -cl class1 -urlh annh,annh2 -conngroupid group1 -state off -mime mime.types -d /export/iplanet/server6 -sinst https-iplanet.com


delete コマンド

delete コマンドを使用して、仮想サーバのクラス、仮想サーバ、待機ソケット、および接続グループを削除します。


オプション

表 A-9 に示すオプションを delete コマンドとともに使用し、クラス、接続グループ、待機ソケット、および仮想サーバを削除します。


表 A-9    delete コマンドのオプション 

オプション

-c  

指定された仮想サーバクラスを削除  

-g  

指定された接続グループを削除  

-l  

指定された待機ソケット ID を削除  

-v  

指定された仮想サーバを削除  


クラスの削除

delete コマンドのこのオプションを使用して、仮想サーバクラスを削除します。


構文
HttpServerAdmin delete -c -cl classname -d server_root -sinst http_instance


パラメータ
表 A-10 に示すパラメータを delete コマンドとともに使用し、クラスを削除します。


表 A-10    クラス削除のパラメータ

パラメータ

-cl class  

削除するクラス名  




HttpServerAdmin delete -c -cl class1 -d /export/iplanet/server6 -sinst https-iplanet.com


接続グループの削除

delete コマンドのこのオプションを使用して、接続グループを削除します。


構文
HttpServerAdmin delete -g -id connection_group -lsid listen_socket -d server_root -sinst http_instance


パラメータ
表 A-11 に示すパラメータを delete コマンドとともに使用し、接続グループを削除します。


表 A-11    接続グループ削除のパラメータ

パラメータ

-id connection_group  

削除する接続グループの ID  

-lsid listen_socket  

接続グループが属している待機ソケット ID  




HttpServerAdmin delete -g -id conngroup3 -lsid ls2 -d /export/iplanet/server6 -sinst https-iplanet.com


待機ソケットの削除

delete コマンドのこのオプションを使用して、待機ソケットを削除します。


構文
HttpServerAdmin delete -l -id listen_socket -d server_root -sinst http_instance


パラメータ
表 A-12 に示すパラメータを delete コマンドとともに使用し、クラスを削除します。


表 A-12    待機ソケット削除のパラメータ

パラメータ

-id listen_socket  

削除する待機ソケットの ID  




HttpServerAdmin delete -l -id ls3 -d /export/iplanet/server6 -sinst https-iplanet.com


仮想サーバの削除

delete コマンドのこのオプションを使用して、仮想サーバを削除します。


構文
HttpServerAdmin delete -v -id virtual_server -cl classname -d server_root -sinst http_instance


パラメータ
表 A-13 に示すパラメータを delete コマンドとともに使用し、仮想サーバを削除します。


表 A-13    仮想サーバ削除のパラメータ

パラメータ

-id virtual_server  

削除する仮想サーバの ID  

-cl class  

仮想サーバが属しているクラス  




HttpServerAdmin delete -v -id vs3 -cl class1 -d /export/iplanet/server6 -sinst https-iplanet.com


list コマンド

list コマンドを使用して、仮想サーバのクラス、仮想サーバ、待機ソケット、および接続グループをリストに表示します。


構文

HttpServerAdmin list -command_option -d server_root -sinst http_instance


オプション


表 A-14    List コマンドのオプション 

オプション

-c  

すべての仮想サーバクラスをリストに表示する  

-g -lsid listen_socket  

待機ソケットのすべての接続グループをリストに表示する  

-l  

すべての待機ソケットをリストに表示する  

-v  

すべての仮想サーバをリストに表示する  





HttpServerAdmin list -c -d /export/iplanet/server6 -sinst https-iplanet.com

HttpServerAdmin list -l -d /export/iplanet/server6 -sinst https-iplanet.com

HttpServerAdmin list -g -lsid ls1 -d /export/iplanet/server6 -sinst https-iplanet.com

コマンドウィンドウに情報のリストが表示されます。


前へ     目次     索引     DocHome     次へ     
Copyright © 2001 Sun Microsystems, Inc. Some preexisting portions Copyright © 2001 Netscape Communications Corp. All rights reserved.

Last Updated October 17, 2001