Sun Java System Messaging Server 6 2005Q4 管理指南

运行 comm_dssetup.pl 脚本

您可以在交互模式或无提示模式下运行 comm_dssetup.pl,如以下两节所示:

可以使用表 E–3 中的安装工作单记录答案。

Procedure在交互模式下运行 comm_dssetup.pl

如果您指定了不带任何变量的 comm_dssetup.pl,系统将询问您以下问题:

步骤
  1. 介绍


    # perl comm_dssetup.pl
    
    Welcome to the Directory Server preparation tool for Java Enterprise 
    Communications Server.(Version X.X Revision X.X)
    This tool prepares your directory server for Sun Java System Messaging 
    Server install.
    
    The logfile is /var/tmp/dssetup_YYYYMMDDHHSS
    
    Do you want to continue [y]:

    按 Enter 键继续。输入 No 可以退出。

  2. Directory Server 的安装根目录


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

    请指明 Directory Server 计算机上 Directory Server 安装根目录的位置。请注意,在 Linux 上,Directory Server 根目录位置是不同的。

  3. Directory Server 实例


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

    如果计算机上有多个 Directory Server 实例,请选择要使用 Messaging Server 进行配置的实例。

  4. 目录管理员的独特名称 (Distinguished Name, DN)


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

    DN 为 (cn=Directory Manager) 的目录管理员是负责组织树中用户和组数据的管理员。请确保此脚本中指定的目录管理员 DN 与您在 Directory Server 安装和 Messaging Server 安装中设置的 DN 相同。

  5. 用户和组的 Directory Server


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

    如果键入 Yes,系统将询问更多关于用户/组树的问题。

    如果键入 No,则假定仅将此目录实例用于存储配置数据;您将跳到有关更新模式文件的问题。针对配置目录实例运行此脚本后,您需要针对存储用户和组数据的目录实例运行此脚本,然后才能继续安装过程。

  6. 用户和组基本后缀


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

    用户和组基本后缀是组织树中的顶层条目,它包含用户和组条目的名称空间。请确保您选择的用户和组基本后缀与您在 Directory Server 安装和 Messaging Server 安装过程中指定的后缀相同。


    注 –

    如果安装了 Access Manager,请确保在安装 Access Manager 时指定的后缀与您为此问题指定的后缀相同。如果使用不同的后缀,Messaging Server 将无法识别您安装的 Access Manager。


    有关组织树的更多信息,请参见 《Sun Java System Communications Services 6 2005Q4 Deployment Planning Guide》中的“LDAP Directory Information Tree Requirements”《Sun Java Enterprise System 2003Q4 Installation Guide》 中的第 12 章 "Provisioning and Schema Concepts for Messaging Server 6.0"

  7. 模式类型


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

    如果打算使用 Sun LDAP Schema 1,请选择选项 1

    如果打算使用 Sun LDAP Schema 2(兼容模式),请选择选项 1.5。有关更多信息,请参见《Sun Java System Communications Services 6 2005Q4 Schema Migration Guide》

    如果打算使用 Sun LDAP Schema 2(本机模式),请选择选项 2

    如果未安装 Access Manager,comm_dssetup.pl 将不再终止。而会警告未安装 Access Manager 并建议为您安装 Schema 2。警告屏幕如下:


    Please enter the Schema Type (1, 1.5, 2) [1]: 2
    
    Access Manager has not been configured for this new user/group suffix
    
    You can opt to continue, but you will not be able to use features
    that depend on Access Manager
    
    Are you sure you want this schema type? [n]:

    有关模式选项的更多信息,请参见 《Sun Java System Communications Services 6 2005Q4 Deployment Planning Guide》中的第 8  章 “Understanding Schema and Provisioning Options”

  8. 域组件 (Domain Component, DC) 树基本后缀


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

    注 –

    如果在步骤 7 中选择了选项 1 或 1.5,系统将要求您提供 DC 树基本后缀。如果选择了选项 2(Sun LDAP Schema 2,本机模式),系统将不会提出此问题。


    DC 树对本地 DNS 结构作镜像,可被系统用于对包含用户和组数据项的组织树的索引。DC 树基本后缀是 DC 树中顶层条目的名称。您可以选择默认值 o=internet 或其他名称。

    有关 DC 树或组织树的更多信息,请参见 《Sun Java System Communications Services 6 2005Q4 Deployment Planning Guide》中的“LDAP Directory Information Tree Requirements”《Sun Java Enterprise System 2003Q4 Installation Guide》 中的第 12 章 "Provisioning and Schema Concepts for Messaging Server 6.0"

  9. 更新模式文件


    Do you want to update the schema files [yes]:

    如果回答 Yes,则将把新元素添加到您的模式中。建议您每次安装新版本的 Messaging Server 时都使用新模式文件更新目录。

  10. 配置新索引


    Do you want to configure new indexes [yes]:

    如果对是否将目录服务器用于用户/组(步骤 5)这个问题的回答为 Yes,系统将询问您:是否要配置新索引,并使用该索引创建高速缓存以提高目录搜索的效率。建议您对此问题回答 Yes。但是,在某些情况下您不需要创建索引:

    • 如果是为仅用于提供拷贝服务的主用户/组 Directory Server,即没有对用户/组 Directory Server 执行的直接查询。

    • 如果您的生产用户/组 Directory Server 具有大量条目,您不希望在其中创建索引而导致较长的停机时间。

  11. 设置摘要


    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                    : o=usergroup
      Add New Indexes                    : 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]:

    更新目录配置之前,将显示您的设置摘要。此时将不能进行更改。


    注 –

    如果在步骤 7 中选择了选项 2:Sun LDAP Schema 2(本机模式),设置摘要中的 DC 根将与您输入的用户/组根的值相同。


    如果要更改任何设置,请输入 No 并再次运行脚本。

    如果输入 Yes 继续运行,则 comm_dssetup.pl 脚本将创建 LDIF 文件和 Shell 脚本,它们用于更新 Directory Server 中的索引和模式:


    /var/tmp/dssetup_YYYYMMDDHHMMSS.sh
    /var/tmp/dssetup_YYYYMMDDHHMMSS.ldif
    

    其中 YYYYMMDDHHMMSS 表示文件的创建时间和日期戳。


    注 –

    您可以选择现在运行脚本或以后运行脚本。如果选择现在运行脚本,请在系统询问您是否要继续时键入 Yes。如果要在以后运行脚本,届时可以使用 /var/tmp/dssetup_YYYYMMDDHHMMSS.sh 调用脚本。


Procedure在无提示模式下运行 comm_dssetup.pl

步骤

    要启用无提示模式,请在一行中一次指定所有变量:


    # perl comm_dssetup.pl -i yes|no -R yes|no -c \
    Directory_Svr_Root -d Directory_instance \
     -r DC_tree -u User_Group_suffix -s yes|no \
    -D "DirectoryManagerDN" \
      -w password -b yes|no -t 1|1.5|2 \
    -m yes|path-to-schema-files]
    

    例如:


    # perl comm_dssetup.pl -i yes -c /var/opt/mps/serverroot -d slapd-budgie 
    -r o=internet -u o=usergroup -s yes -D "cn=Directory Manager"  
    -w password -b yes -t 1 -m yes
    

    此命令的选项包括:

    选项 

    说明 

    -i yes|no

    回答以下问题:“是否要配置新索引?” 指定 yes 可以配置新索引。如果不希望配置新索引,请指定 no

    -R yes|no

    如果找到新索引并提供了 -m yes,则执行重新索引 

    -c Directory_Svr_Root

    Directory Server 根路径名。例如:/var/opt/mps/serverroot

    -d Directory_instance

    Directory Server 实例子目录。例如:slapd-budgie

    -r DC_tree

    DC 树后缀。例如:o=internet

    -u User_Group_suffix

    用户/组后缀。示例:o=usergroup

    -s yes|no

    回答以下问题:“是否要更新模式?” 指定 yes 可以更新模式文件。如果不希望更新模式文件,请指定 no

    -D DirectoryManagerDN

    目录管理员 DN。例如,"cn=Directory Manager"

    -w password

    目录管理员密码 

    -b yes|no

    回答以下问题:“是否将此目录服务器用于用户和组?” 如果要将目录服务器用于配置和用户/组,请指定 yes。如果只将此目录用于配置数据,请指定 no

    -t 1|1.5|2

    确定要用于 Messaging Server 的模式版本: 

    • 要使用 Sun LDAP Schema 1,请选择 1

    • 要使用 Sun LDAP Schema 2(兼容模式),请选择 1.5。有关更多信息,请参见Sun Java System Communications Services Schema Migration Guide

    • 要使用 Sun LDAP Schema 2(本机模式),请选择 2

    -m yes|no

    回答以下问题:“是否要修改 Directory Server?” 指定 yes 可以修改目录。如果不希望修改目录,请指定 no

    -S path-to-schema-files

    指定模式文件的目录路径。例如:./schema.

    comm_dssetup.pl 脚本设置所有选项后,您可以在该脚本运行之前看到以下摘要屏幕:


    Here is a summary of the settings that you chose:
      Server Root                        : /var/opt/mps/serverroot/
      Server Instance                    : slapd-budgie
      Users/Groups Directory             : Yes
      Update Schema                      : yes
      Schema Type                        : 1
      DC Root                            : o=internet
      User/Group Root                    : o=usergroup
      Add New Indexes                    : yes
      Schema Directory                   : ./schema
      Directory Manager DN               : "cn=Directory Manager"

    在交互模式下运行 comm_dssetup.pl中对每个选项做了进一步介绍。