Sun Java Communications Suite 5 インストールガイド

Directory Preparation Tool の実行

この節の内容は、次のとおりです。

ProcedureDirectory Preparation Tool を実行する

  1. Directory Server がインストールされているサーバー上で、スーパーユーザー (root) としてログインするか、スーパーユーザーになります。

  2. 必要に応じて Directory Server を起動します。

  3. /opt/SUNWcomds/sbin ディレクトリに移動します。

    あるいは、必要に応じて、.zip ファイルが /opt/SUNWcomds/lib で入手できます。

  4. サイレントモードまたは対話型モードで、Directory Preparation Tool を実行します。

    詳細な手順については、「Directory Preparation Tool の実行」または「Directory Preparation Tool の実行」を参照してください。

    ツールスクリプトを実行するには、インストーラによって自動的にインストールされ、共有コンポーネントとして組み込まれているバージョンの Perl を使用します。インストールが終わると、Perl は次のディレクトリに保存されています。

    ds-svr-base/bin/slapd/admin/bin/perl

ProcedureDirectory Preparation Tool を対話型モードで実行する

対話型モードで Directory Preparation Tool を実行するには、引数なしでスクリプトを実行し、表示された質問に対して選択項目を入力します。

次の番号付きのリストは、対話型モードのスクリプトの使用方法をパネルごとに示しています。

  1. 「最初の画面」パネル


    # cd /opt/SUNWcomds/sbin
    # ./comm_dssetup.pl
    
    Welcome to the Directory Server preparation tool for 
    Sun Java System Communications Services.
    (Version 6.3 Revision 0.1)
    This tool prepares your directory server for use by the
    communications services which include Messaging, 
    Calendar and their components.
    The logfile is /var/tmp/dssetup_YYYYMMDDHHSS
    Do you want to continue [y]:

    Enter キーを押して続行するか、no と入力してから Enter キーを押して終了します。

  2. 「Directory Server のインストールルート」パネル


    Please enter the full path to the directory where the 
            Sun Java System Directory Server was installed.
    Directory server root [/var/opt/mps/serverroot]

    Directory Server のインストールルートの場所を指定します。デフォルトをそのまま使用する場合は、Enter キーを押します。

  3. 「Directory Server のインスタンス」パネル

    マシンに Directory Server の複数のインスタンスがある場合は、それらが表示され、1 つを選択するように求められます。


    Please select a directory server instance from the following list:
           [1] slapd-varrius
    Which instance do you want [1]:

    選択項目に対応する番号を入力し、Enter キーを押します。デフォルトをそのまま使用する場合は、番号を入力せずに、Enter キーを押します。

  4. 「Directory Manager の識別名 (DN)」パネル

    この画面には、Directory Manager DN を入力する部分と Directory Manager のパスワードを入力する部分があります。

    1. 最初に、Directory Manager の DN (識別名) の入力が求められます。


      Please enter the directory manager DN [cn=Directory Manager]:

      Directory Manager DN (デフォルトは cn=Directory Manager) は組織ツリー内のユーザーおよびグループのデータに責任を持つ管理者です。このスクリプトで指定する Directory Manager DN が、Calendar Server 設定や Messaging Server 設定と同様、Directory Server のインストールに設定したものと同じ DN であることを確認してください。

      デフォルトをそのまま使用する場合は、Enter キーを押します。

    2. Directory Manager のパスワードの入力が求められます。


      Password:

      Directory Manager のパスワードを入力し、Enter キーを押します。

      Directory Server が実行しており、ポート 389 (デフォルトポート) で待機しているかどうかが確認されます。

      成功すると、次の例に示すように、検出されたバージョンが表示されます。


      Detected DS version 5.2

      成功しなかった場合は、Directory Server が実行しているか、またはポート 389 (デフォルト) で待機していることが検出されなかったことが伝えられます。続行する前にこの問題を修正するように指示されます。スクリプトは終了します。以下にこの出力の例を示します。


      Directory Server not running or not listening to port 389.
      Detected DS version 0.0
      Please correct the problem and re-run this script.
  5. 「ユーザーおよびグループの Directory Server」パネル


    Will this directory server be used for users/groups [Yes]:

    このディレクトリのインスタンスが設定データの格納にのみ使用される場合は No を入力します。デフォルトをそのまま使用する場合は Enter キーを押します。

    No を入力した場合は、ユーザーおよびグループのデータを格納するディレクトリインスタンスに対してもこのスクリプトを実行する必要があります。この作業は、設定プログラム csconfigurator.sh を実行する前に行ってください。

    回答が Yes の場合は、組織ツリーに対するユーザーおよびグループベースのサフィックスを指定する必要があります。

  6. 「ユーザーおよびグループベースのサフィックス」パネル


    Please enter the Users/Groups base suffix [o=usergroup]:

    ユーザーおよびグループベースのサフィックスは、LDAP 組織ツリーの最上位のエントリです。必ず、ここで選択したサフィックスが Directory Server、Communications Suite サーバーおよび Access Manager に対して指定したサフィックスと同じになるようにしてください。

  7. 「スキーマタイプ」パネル


    There are 3 possible schema types:
    1-schema 1 for systems with Calendar or Messaging 5.x data
    1.5-schema 2 compatibility for systems with Calendar or Messaging 5.x
        data that has been converted with the Schema Migration Utility 
        commdirmig
    2-schema 2 native for systems using Access Manager
    Please enter the Schema Type (1, 1.5, 2) [1]:

    スキーマタイプを入力します。デフォルトをそのまま使用する場合は、Enter キーを押します。


    注 –

    Schema 2 (オプション 1.5 または 2) を使用する場合は、Access Manager のインストールと設定を行う必要があります。そうしないと、Directory Preparation Tool が終了します。Directory Preparation Tool を再実行する前に、Access Manager をインストールする必要があります。


  8. 「ドメインコンポーネント (DC) ツリーベースのサフィックス」パネル

    Schema 1 または Schema 2 の互換モードを選択した場合は、DC ツリーベースのサフィックスを入力するように求められます。Schema 2 ネイティブモードを選択した場合は、このメッセージは表示されません。


    Please enter the DC Tree base suffix [o=internet]:

    前述した「スキーマタイプ」パネルで Schema 1 または Schema 2 の互換モードを選択した場合は、DC ツリーベースのサフィックスを入力するように求められます。Schema 2 ネイティブモードを選択した場合は、このメッセージは表示されません。

    DC ツリーはローカル DNS 構造をミラー化し、ユーザーおよびグループのデータエントリを含む組織ツリーへのインデックスとして、システムによって使用されます。DC ツリーベースのサフィックスは、DC ツリーの最上位エントリ名です。

    サフィックスを入力します。デフォルトをそのまま使用する場合は、Enter キーを押します。

  9. 「質問」パネル

    この次の画面では、ディレクトリへの更新に関する一連の質問が表示されます。

    1. 「スキーマファイルの更新」

      この時点で、プログラムはスキーマの要素が正しいかどうかを確認します。スキーマに足りない要素があると、次のメッセージを表示します。


      Detected bad schema elements in 99user.ldif. 
      It is recommended that you update the schema.
      
      Do you want to update the schema files [yes]:

      必要な新しい要素をスキーマに追加する場合は、Yes と回答します。新しいバージョンの Calendar Server または Messaging Server をインストールするたびに、新しいスキーマファイルでディレクトリを更新する必要があります。

      ここでスキーマファイルを更新しない場合は、No と回答します。

    2. 「新しいインデックスの設定」

      前の手順でスキーマを更新するようにした場合は、新しいインデックスを設定するかどうか尋ねられます。属性にインデックスを作成する方法については、「Directory Preparation Tool によって作成される属性のインデックス」を参照してください。


      Do you want to configure new indexes [yes]:

      インデックスの作成を承認する場合は、Enter キーを押します。

      すでに同じ属性に対してインデックスの作成手順を実行している場合は、no を入力します。

    3. 「インデックスの再生成」

      すぐにインデックスを作成するか、あとで作成するかを選択できます。あとでインデックスを作成することを選択した場合は、都合のいいときにインデックスの作成を有効にしてスクリプトを再実行します。インデックス作成には長い時間がかかる可能性がありますが、Directory Server はその間も機能しています。つまり、インデックスの作成中も読み取り専用モードにはなりません。


      Reindex now [yes]?

      あとでインデックスの作成を行いたい場合は、no を入力します。そうでない場合は、Enter キーを押して、デフォルトをそのまま使用します。

  10. 「設定の概要」パネル

    Directory Preparation Tool は Directory Server 設定を更新する前に、設定の概要を表示し、続行するかどうかを質問します。


    Here is a summary of the settings that you chose:
      Server Root                    : /var/opt/mps/serverroot/
      Server Instance                : slapd-varrius
      Users/Groups Directory         : yes
      Update Schema                  : yes
      Schema Type                    : 1
      DC Root                        : o=internet
      User/Group Root                : dc=red,dc=sesta,dc=com
      Add New Indexes                : yes
      Reindex New Indexes Now        : yes
      Directory Manager DN           : cn=Directory Manager
    
    Now ready to generate a shell script and ldif file to modify the
    Directory. 
    No changes to the Directory Server will be made this time.
    Do you want to continue [Y]:

    「Directory Preparation Tool の実行」で Schema 2 ネイティブモードを選択した場合、DC ルートは「User/Group Root」で入力した値と同じになります。

    設定を変更するには、no と入力してスクリプトを再実行します。

    続行する場合は Enter キーを押します。Directory Preparation Tool によって LDIF ファイルとシェルスクリプトが作成されます。作成されるファイルの名前は次のようになります。

    /var/tmp/dssetup_timestamp.ldif

    /var/tmp/dssetup_timestamp.sh

    続行すると、プログラムの実行に従って、メッセージが表示されます。次に、出力の例を示します。


    Generating files...
    
    Checking to see if Suffixes need to be added
    
    Checking to see that uid uniqueness plugins are turned off
    
    Adding indexes
      Adding Indexes for User/group Tree (backend:userRoot)
        Checking indexes for member
          No new indexes required
        Checking indexes for mailAlternateAddress
          No new indexes required
        Checking indexes for mail
          No new indexes required
        Checking indexes for mailEquivalentAddress
          No new indexes required
        Checking indexes for cosspecifier
          No new indexes required
      Adding Indexes for DC Tree (backend:internetdb2)
        Checking indexes for inetCanonicalDomainName
          No new indexes required
        Checking indexes for inetDomainBaseDN
          No new indexes required
      Adding Indexes for PAB Tree (backend:pabdb2)
        Checking indexes for memberOfPAB
          No new indexes required
        Checking indexes for icsCalendar
          No new indexes required
        Checking indexes for un
          No new indexes required
        Checking indexes for memberOfPABGroup
          No new indexes required
        Checking indexes for icsCalendarOwned
          No new indexes required
        Checking indexes for memberOfManagedGroup
          No new indexes required
      Adding Indexes for New PAB Tree (backend:PiServerDbdb2)
        Checking indexes for MemberOfPiBook
          No new indexes required
        Checking indexes for MemberofPiGroup
          No new indexes required
        Checking indexes for displayname
          No new indexes required
    
    Checking to see if DN needs to be created for suffixes 
    Generating ldif for installer metadata
      Generating ldif for Adding schema for installer metadata
      Generating ldif for updating DN for cn=CommServers,o=comms-config
    The following files have been created:
       /var/tmp/dssetup_20041209114027.sh
       /var/tmp/dssetup_20041209114027.ldif
    
    Running /var/tmp/dssetup_20041209114027.sh will make changes 
      to the Directory. You can run this file now or at a later time
    Ready to execute the script now.
  11. 「スクリプトの実行」


    Do you want to continue [yes]:

    デフォルトの設定 (yes) をそのまま使用する場合は、Enter キーを押します。 dssetup_timestamp.sh スクリプトが LDAP ディレクトリに対して実行されます。スクリプトを今すぐ実行しない場合は、No を入力して終了します。終了した場合は、あとで /var/tmp/dssetup_ timestamp.sh スクリプトを実行できます。

    次に、スクリプトの実行中に生成されるテキスト出力の例を示します。


    Running /var/tmp/dssetup_20041209114027.sh 
       -D "cn=Directory Manager"
       -j /var/tmp/dssetup_20041209114027.pw
    Stopping Directory Server
    Updating Schema files...
    Copying 20subscriber.ldif
    Copying 50ns-delegated-admin.ldif
    Copying 50ns-mail.ldif
    Copying 50ns-mlm.ldif
    Copying 50ns-msg.ldif
    Copying 50ns-value.ldif
    Copying 55ims-ical.ldif
    Copying 56ims-schema.ldif
    Copying 70sun-schema2.ldif
    Copying 71sun-am.ldif
    Copying 60iplanet-calendar.ldif
    Copying 50ns-iabs.ldif
    Copying 98ns-dummy-uwc.ldif
    Copying 70delgated-admin.ldif
    Copying /var/tmp/99user_20041209114027.ldif to 
            /var/opt/mps/serverroot/slapd-varrius/config/schema/99user.ldif
    Starting Directory Server
    Applying ldif file /var/tmp/dssetup_20041209114027.ldif
    modifying entry cn=schema
    
    modifying entry cn=schema
    
    modifying entry cn=CommServers,o=comms-config
    
    Done Applying ldif file /var/tmp/dssetup_20041209114027.ldif
    rejects to /var/tmp/dssetup_20041209114027.ldif.rej status = 0
    Successful Completion. 
    Consult /var/tmp/dssetup_20041209114027.log for details

Directory Preparation Tool をサイレントモードで実行する

Directory Preparation Tool サイレントモードの手順

サイレントモードで Directory Preparation Tool を実行するには、「Directory Preparation Tool サイレントモードの構文」に示す構文を使って、オプションの文字列が付いた Perl コマンドを実行します。オプション引数はすべて必須です。表 8–1 にそれらのオプションを示します。

このユーティリティーによって、次の LDIF ファイルとシェルスクリプトが作成され、LDAP ディレクトリのインデックスとスキーマが更新されます。

/var/tmp/dssetup_timestamp.ldif

/var/tmp/dssetup_timestamp.sh

指定したオプションの値に応じて、ユーティリティーが新しいスクリプトを実行して Directory Server を更新するかどうかが決まります。更新を行わないようにした場合は、スクリプトを確認し、必要な変更を行ってから、あとで実際の更新を行うことができます。

Directory Preparation Tool サイレントモードの構文

サイレントモードで実行するすべてのオプションを次に示します。


perl comm_dssetup.pl
    -i yes|no
    -R yes|no
    -c DirectoryServerRoot
    -d DirectoryInstance
    -r DCTreeSuffix
    -u UserGroupSuffix
    -s yes|no
    -D DirectoryManagerDN
    -w DirectoryManagerPassword
    -b yes|no -t 1|1.5|2
    -m yes|no
   [-S PathtoSchemaFiles]
               
表 8–1 サイレントモードで Directory Preparation Tool を実行するオプションの説明

オプションと引数 

説明 

-i yes|no

次の質問に対する回答。“Do you want to configure new indexes?” 

yes 新しい Directory Server インデックスを追加します。

no: インデックスを追加しません。

-R yes|no

次の質問に対する回答。“Do you want to reindex now?” このオプションを有効にするには、-m オプションも yes になっている必要があります。

-c DirectoryServerRoot

Directory Server のルートパス。次に例を示します。/var/opt/mps/ldap

-d DirectoryInstance

Directory Server インスタンスのサブディレクトリ。次に例を示します。slapd-varrius

-r DCTreeSuffix

DC ツリーのルートサフィックス。(Schema 1 および Schema 2 の互換モードのみ) 

次に例を示します。dc=varrius,dc=sesta,dc=com

-u UserGroupSuffix

ユーザーおよびグループのルートサフィックス。次に例を示します。dc:west,dc=sesta,dc=com

-s yes|no

次の質問に対する回答。“Do you want to update the schema?” 

yes: スキーマを更新します。config ディレクトリとスキーマファイルが必要です。

no: スキーマを更新しません。

-D DirectoryManagerDN

Directory Manager の識別名 (DN)。Directory Preparation Tool で空白文字を含む値を正しく解釈できるように、値を二重引用符 (" ") で囲む必要があります。

次に例を示します。"cn=Directory Manager"

-w DirectoryManagerPassword

Directory Manager の DN パスワード。 

-b yes|no

次の質問に対する回答。“Will this directory server be used for users and groups?” 

yes: このディレクトリを設定とユーザーグループデータの両方を格納するために使用します。

no: このディレクトリを設定データの格納だけに使用します。

-t 1|1.5|2

スキーマのバージョン。 

  • 1 Sun LDAP Schema 1

  • 1.5 Sun LDAP Schema 2 互換モード

  • 2 Sun LDAP Schema 2 ネイティブモード

-m yes|no

次の質問に対する回答。“Do you want to modify the directory server?” 

yes: ユーザーに確認を求めることなく Directory Server を変更します。

no: ユーザーの確認がなければ Directory Server を変更しません。

-S PathtoSchemaFiles

スキーマファイルが格納されているディレクトリへのパス。次に例を示します。./schema