本节说明了如何运行 Directory Server 设置脚本 (comm_dssetup.pl),该脚本用于配置 LDAP Directory Server 以使其能够与 Messaging Server、Calendar Server 或用户管理实用程序配置结合使用。comm_dssetup.pl 脚本通过在 Directory Server 中设置新的模式、索引和配置数据来准备 Directory Server。新安装 Messaging Server 和 Communications Express 时必须运行该脚本。如果要升级依赖于 Directory Server 的任何组件产品,最好运行最新的 comm_dssetup.pl。
本节说明了以下主题:
在 Java Enterprise System 的早期版本中,此实用程序与 Messaging Server 和 Calendar Server 捆绑在一起,不必单独安装。但是,从 Java Enterprise System 2005Q1 开始,该脚本成为一个可单独安装的共享组件。
要安装 comm_dssetup.pl,请选择以下方法之一:
使用 Java Enterprise System 安装程序时,在组件选择面板上选择 comm_dssetup.pl。(选择 Directory Server 也将自动选择 comm_dssetup.pl。)
如果您从 Java Enterprise System 的早期版本升级,而且未使用 Java Enterprise System 安装程序,则请下载以下修补程序:
Solaris Sparc:118245 和 118242
Solaris x86:118256 和 118243
Linux:仅 118247
安装时,将在以下目录中找到 comm_dssetup.pl:
Solaris:/opt/SUNWcomds/sbin
Linux:/opt/sun/comms/dssetup/sbin
在运行 comm_dssetup.pl 脚本之前,请务必阅读以下要求:
在运行 comm_dssetup.pl 脚本之前,必须先安装并配置目录服务器。
以超级用户身份运行 comm_dssetup.pl 脚本。
在运行 Messaging Server、Calendar Server、Communications Express 或用户管理实用程序初始运行时配置程序之前,运行 comm_dssetup.pl。
通常,如果已在目录服务器上为某个产品(例如 Calendar Server)运行了 comm_dssetup.pl,则不必为其他产品(例如 Messaging Server)再次运行该脚本(只要两种产品使用的是同一个目录服务器)。但是,如果您更改了运行 comm_dssetup 时给出的某些回答,则需要再次运行 comm_dssetup。例如,如果您要为 Messaging Server 的下一个配置使用不同的用户/组后缀,比如由于运行 commdirmig(从 Sun LDAP Schema 1 迁移到 Sun LDAP Schema 2)。
必须在目录服务器上运行 comm_dssetup.pl 脚本。
确保在运行 comm_dssetup.pl 之前先运行目录服务器。
每次安装新版本的 Messaging Server 时,都需要在 Directory Server 计算机上运行新版本的 comm_dssetup.pl。新的模式和索引可能会添加到每个 Messaging Server 分发中。
如果配置数据以及用户和组数据被分到两个不同的目录实例中,则需要在这两个实例中运行 comm_dssetup 脚本。
对于 UNIX 系统,使用 Directory Server 附带的 Perl 版本可以避免版本问题。dir_svr_root/bin/slapd/admin/bin/perl 。
如果是在远程目录服务器上运行 comm_dssetup.pl,请执行以下操作:
将 dssetup.zip 文件从 msg_svr_base/install 目录复制到远程目录服务器上。您可能要将其复制到类似于 /tmp 或 /var/tmp 的目录中。如果不希望在所有 Directory Server 计算机上安装 comm_dssetup,您可以将 zip 文件复制到其他 Directory Server 计算机上而不安装 comm_dssetup。
解压缩 dssetup.zip 文件(包含 comm_dssetup.pl 和必需模式)。
在远程目录服务器上运行 comm_dssetup.pl 脚本。
如果运行的是复制的 Directory Server,则需确保对主目录和副本目录均运行 comm_dssetup.pl 脚本。
运行 Directory Server 设置脚本 (comm_dssetup.pl) 以准备 Directory Server 从而使其可以用于 Messaging Server 配置时,请将安装参数记录在表 E–3 中。您需要将其中的某些参数用于 Messaging Server 初始运行配置。
您可以在交互模式或无提示模式下运行 comm_dssetup.pl,如以下两节所示:
可以使用表 E–3 中的安装工作单记录答案。
如果您指定了不带任何变量的 comm_dssetup.pl,系统将询问您以下问题:
介绍
# 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 可以退出。
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 根目录位置是不同的。
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 进行配置的实例。
目录管理员的独特名称 (Distinguished Name, DN)
Please enter the directory manager DN [cn=Directory Manager]: Password: |
DN 为 (cn=Directory Manager) 的目录管理员是负责组织树中用户和组数据的管理员。请确保此脚本中指定的目录管理员 DN 与您在 Directory Server 安装和 Messaging Server 安装中设置的 DN 相同。
用户和组的 Directory Server
Will this directory server be used for users/groups [Yes]: |
如果键入 Yes,系统将询问更多关于用户/组树的问题。
如果键入 No,则假定仅将此目录实例用于存储配置数据;您将跳到有关更新模式文件的问题。针对配置目录实例运行此脚本后,您需要针对存储用户和组数据的目录实例运行此脚本,然后才能继续安装过程。
用户和组基本后缀
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"。
模式类型
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”。
域组件 (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"。
更新模式文件
Do you want to update the schema files [yes]: |
如果回答 Yes,则将把新元素添加到您的模式中。建议您每次安装新版本的 Messaging Server 时都使用新模式文件更新目录。
配置新索引
Do you want to configure new indexes [yes]: |
如果对是否将目录服务器用于用户/组(步骤 5)这个问题的回答为 Yes,系统将询问您:是否要配置新索引,并使用该索引创建高速缓存以提高目录搜索的效率。建议您对此问题回答 Yes。但是,在某些情况下您不需要创建索引:
如果是为仅用于提供拷贝服务的主用户/组 Directory Server,即没有对用户/组 Directory Server 执行的直接查询。
如果您的生产用户/组 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 : 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 调用脚本。
要启用无提示模式,请在一行中一次指定所有变量:
# 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 |
此命令的选项包括:
为 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中对每个选项做了进一步介绍。