本小節提供有關如何執行 Directory Server 設定程序檔 (comm_dssetup.pl) 的說明,該程序檔用於配置 LDAP Directory Server,使其能夠與 Messaging Server、Calendar Server 或 User Management Utility 配置配合工作。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 程序檔之前,必須先安裝並配置 Directory Server。
以超級使用者的身份執行 comm_dssetup.pl 程序檔。
執行 Messaging Server、Calendar Server、Communications Express 或 User Management Utility 初始執行階段配置程式之前,先執行 comm_dssetup.pl。
通常,如果在 Directory Server 上為一種產品 (例如 Calendar Server) 執行 comm_dssetup.pl,則無需再為另一種產品 (例如 Messaging Server) 執行該程序檔,只要這兩種產品使用的是同一 Directory Server 即可。然而,如果您要變更執行 comm_dssetup 時自己提供的某些答案,則需要再次執行 comm_dssetup。例如,因為您執行了 commdirmig (從 Sun LDAP Schema 1 遷移至 Sun LDAP Schema 2),所以要在 Messaging Server 的下一個配置中使用不同的使用者/群組字尾。
必須在 Directory Server 機器上執行 comm_dssetup.pl 程序檔。
請確定在執行 comm_dssetup.pl 之前先執行 Directory Server。
每當安裝新版本的 Messaging Server 時,您均需要在 Directory Server 機器上執行新版本的 comm_dssetup.pl。新的模式和索引可能會加入到每個 Messaging Server 發行物中。
如果配置資料以及使用者資料與群組資料被劃分到不同的目錄實例中,則需要在這兩個實例上均執行 comm_dssetup 程序檔。
對於 UNIX 系統,使用 Directory Server 隨附的 Perl 版本以避免版本問題︰dir_svr_root/bin/slapd/admin/bin/perl。
如果要在遠端 Directory Server 上執行 comm_dssetup.pl,請執行以下作業︰
將 dssetup.zip 檔案從 msg_svr_base/install 目錄複製到遠端 Directory Server 中。您可能要將其複製到類似 /tmp 或 /var/tmp 的目錄中。如果您不想在所有 Directory Server 機器上安裝 comm_dssetup,則可以將 zip 檔案複製到其他 Directory Server 機器上,而不進行安裝。
解壓縮 dssetup.zip 檔案 (包含 comm_dssetup.pl 和必需的模式)。
在遠端 Directory Server 上執行 comm_dssetup.pl 程序檔。
如果執行的是重複的 Directory Server,請確定對主目錄和副本目錄均執行 comm_dssetup.pl 程序檔。
當您執行 Directory Server 設定程序檔 (comm_dssetup.pl) 以為 Messaging Server 配置準備 Directory 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 之安裝根的位置。請注意,Directory Server 根位置與 Linux 上的不同。
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 一同配置的實例。
目錄管理員辨別名稱 (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,並為您安裝模式 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」。
網域元件 (DC) 樹基底字尾
Please enter the DC Tree base suffix [o=internet]: |
在步驟 7 中,如果選擇選項 1 或 1.5,系統會要求您提供 DC 樹狀結構基底字尾。如果選擇選項 2 (Sun LDAP Schema 2 原生模式),系統則不會詢問這一問題。
DC 樹會鏡射本地 DNS 結構,系統會使用 DC 樹作為組織樹 (包含使用者項目和群組項目) 的索引。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]: |
如果對於是否將此 Directory Server 用於使用者/群組這一問題,您回答 Yes (步驟 5),則系統將詢問您是否要配置新索引,新索引將用於建立快取以提昇目錄搜尋的效率。建議您對此問題回答 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中有進一步說明。