建立目錄代理伺服器實例時,會在指定的路徑中建立實例必要的檔案與目錄。
您可以使用 DSCC 執行此作業。如需相關資訊,請參閱目錄服務控制中心介面與 DSCC 線上說明。
如果使用 DSCC 建立新的伺服器實例,可選擇複製現有伺服器的部分或所有伺服器配置設定。
建立目錄代理伺服器實例。
$ dpadm create -p port instance-path |
例如,若要在目錄 /local/dps 中建立新的實例,請使用此指令:
$ dpadm create -p 2389 /local/dps |
若要指定該實例的任何其他參數,請參閱 dpadm(1M) 線上手冊。
若需要則請鍵入密碼。
$ dpadm info instance-path |
(可選擇) 如果使用 Sun JavaTM Enterprise System 安裝程式或原生套裝軟體安裝了目錄代理伺服器,且作業系統提供服務管理解決方案,則您可將伺服器視為服務加以管理,如下表所示。
作業系統 |
指令 |
---|---|
Solaris 10 |
dpadm enable-service --type SMF instance-path |
Solaris 9 |
dpadm autostart instance-path |
Linux、HP-UX |
dpadm autostart instance-path |
Windows |
dpadm enable-service --type WIN_SERVICE instance-path |
(可選擇) 透過使用下列方法之一註冊伺服器實例:
經由 URL https://localhost:6789 存取 DSCC,並登入瀏覽器介面。
使用指令 dsccreg add-server。
如需詳細資訊,請參閱 dsccreg(1M) 線上手冊。
您可以使用 DSCC 執行此作業。如需相關資訊,請參閱目錄服務控制中心介面與 DSCC 線上說明。
您可以使用 DSCC 執行此作業。如需相關資訊,請參閱目錄服務控制中心介面與 DSCC 線上說明。
有時,需要重新啟動伺服器才能使配置變更生效。使用此程序檢查是否需要在變更某項配置後重新啟動目錄代理伺服器實例。
檢視是否需要重新啟動伺服器。
$ dpconf get-server-prop -h host -p port is-restart-required |
如果指令傳回 true,即必須重新啟動目錄代理伺服器實例。
如果指令傳回 false,則無需重新啟動目錄代理伺服器實例。
您可以使用 DSCC 執行此作業。如需相關資訊,請參閱目錄服務控制中心介面與 DSCC 線上說明。
您可以使用 DSCC 執行此作業。如需相關資訊,請參閱目錄服務控制中心介面與 DSCC 線上說明。
$ dpadm stop instance-path |
如不停止實例,刪除指令會自動停止實例。但是,如果已在服務管理解決方案中啟用實例,則必須手動停止實例。
(可選擇) 如果之前使用 DSCC 管理伺服器,請使用指令行取消註冊伺服器。
$ dsccreg remove-server /local/dps Enter DSCC administrator's password: /local/dps is an instance of DPS Enter password of "cn=Proxy Manager" for /local/dps: Unregistering /local/dps from DSCC on localhost. Connecting to /local/dps Disabling DSCC access to /local/dps |
如需詳細資訊,請參閱 dsccreg(1M) 線上手冊。
(可選擇) 如果之前是在服務管理解決方案中啟用伺服器實例,則需停止將伺服器視為服務進行管理。
作業系統 |
指令 |
---|---|
Solaris 10 |
dpadm disable-service --type SMF instance-path |
Solaris 9 |
dpadm autostart --off instance-path |
Linux、HP-UX |
dpadm autostart --off instance-path |
Windows |
dpadm disable-service --type WIN_SERVICE instance-path |
$ dpadm delete instance-path |
本節說明如何配置目錄代理伺服器實例。本節中的程序使用 dpadm 與 dpconf 指令。如需有關這些指令的資訊,請參閱 dpadm(1M) 與 dpconf(1M) 線上手冊。
$ dpconf info Instance Path : instance path Host Name : host Secure listen address : IP address Port : port Secure port : secure port SSL server certificate : defaultServerCert Directory Proxy Server needs to be restarted. |
只有 Secure listen address 與 Non-secure listen address 設定為非預設值時,dpconf info 才會顯示這些特性。上述輸出不會顯示 Non-secure listen address,因為此特性並未設定為非預設值。
如果需要重新啟動實例,dpconf info 也會提醒使用者重新啟動。
您也可以使用 dpadm info 來顯示目錄代理伺服器實例配置資訊。
您可以使用 DSCC 執行此作業。如需相關資訊,請參閱目錄服務控制中心介面與 DSCC 線上說明。
尋找目錄代理伺服器目前的配置。
$ dpconf get-server-prop -h host -p port |
allow-cert-based-auth : allow allow-ldapv2-clients : true allow-persistent-searches : false allow-sasl-external-authentication : true allow-unauthenticated-operations : true allowed-ldap-controls : - cert-data-view-routing-custom-list : none cert-data-view-routing-policy : all-routable cert-search-attr-mappings : none cert-search-base-dn : none cert-search-bind-dn : none cert-search-bind-pwd : none cert-search-user-attr : userCertificate configuration-manager-bind-dn : cn=proxy manager configuration-manager-bind-pwd : {3DES}RPdIFbvoWdvhLR8lU43zCMZyKFGPxfFg connection-pool-wait-timeout : 3s data-source-read-timeout : 20s data-view-automatic-routing-mode : automatic email-alerts-enabled : false email-alerts-message-from-address : local email-alerts-message-subject : Proxy Server Administrative Alert email-alerts-message-subject-includes-alert-code : false email-alerts-message-to-address : root@localhost email-alerts-smtp-host : localhost email-alerts-smtp-port : smtp enable-remote-user-mapping : false enable-user-mapping : false enabled-admin-alerts : none enabled-ssl-cipher-suites : JRE enabled-ssl-protocols : SSLv3 enabled-ssl-protocols : TLSv1 encrypt-configuration : true extension-jar-file-url : none is-restart-required : false number-of-search-threads : 20 number-of-worker-threads : 50 proxied-auth-check-timeout : 30m remote-user-mapping-bind-dn-attr : none scriptable-alerts-command : echo scriptable-alerts-enabled : false search-mode : parallel search-wait-timeout : 10s ssl-client-cert-alias : none ssl-server-cert-alias : defaultServerCert supported-ssl-cipher-suites : SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA supported-ssl-cipher-suites : SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA supported-ssl-cipher-suites : SSL_DHE_DSS_WITH_DES_CBC_SHA supported-ssl-cipher-suites : SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA supported-ssl-cipher-suites : SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA supported-ssl-cipher-suites : SSL_DHE_RSA_WITH_DES_CBC_SHA supported-ssl-cipher-suites : SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA supported-ssl-cipher-suites : SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 supported-ssl-cipher-suites : SSL_DH_anon_WITH_3DES_EDE_CBC_SHA supported-ssl-cipher-suites : SSL_DH_anon_WITH_DES_CBC_SHA supported-ssl-cipher-suites : SSL_DH_anon_WITH_RC4_128_MD5 supported-ssl-cipher-suites : SSL_RSA_EXPORT_WITH_DES40_CBC_SHA supported-ssl-cipher-suites : SSL_RSA_EXPORT_WITH_RC4_40_MD5 supported-ssl-cipher-suites : SSL_RSA_WITH_3DES_EDE_CBC_SHA supported-ssl-cipher-suites : SSL_RSA_WITH_DES_CBC_SHA supported-ssl-cipher-suites : SSL_RSA_WITH_NULL_MD5 supported-ssl-cipher-suites : SSL_RSA_WITH_NULL_SHA supported-ssl-cipher-suites : SSL_RSA_WITH_RC4_128_MD5 supported-ssl-cipher-suites : SSL_RSA_WITH_RC4_128_SHA supported-ssl-cipher-suites : TLS_DHE_DSS_WITH_AES_128_CBC_SHA supported-ssl-cipher-suites : TLS_DHE_RSA_WITH_AES_128_CBC_SHA supported-ssl-cipher-suites : TLS_DH_anon_WITH_AES_128_CBC_SHA supported-ssl-cipher-suites : TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 supported-ssl-cipher-suites : TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA supported-ssl-cipher-suites : TLS_KRB5_EXPORT_WITH_RC4_40_MD5 supported-ssl-cipher-suites : TLS_KRB5_EXPORT_WITH_RC4_40_SHA supported-ssl-cipher-suites : TLS_KRB5_WITH_3DES_EDE_CBC_MD5 supported-ssl-cipher-suites : TLS_KRB5_WITH_3DES_EDE_CBC_SHA supported-ssl-cipher-suites : TLS_KRB5_WITH_DES_CBC_MD5 supported-ssl-cipher-suites : TLS_KRB5_WITH_DES_CBC_SHA supported-ssl-cipher-suites : TLS_KRB5_WITH_RC4_128_MD5 supported-ssl-cipher-suites : TLS_KRB5_WITH_RC4_128_SHA supported-ssl-cipher-suites : TLS_RSA_WITH_AES_128_CBC_SHA supported-ssl-protocols : SSLv2Hello supported-ssl-protocols : SSLv3 supported-ssl-protocols : TLSv1 syslog-alerts-enabled : false syslog-alerts-facility : USER syslog-alerts-host : localhost use-cert-subject-as-bind-dn : true use-external-schema : false user-mapping-anonymous-bind-dn : none user-mapping-anonymous-bind-pwd : none user-mapping-default-bind-dn : none user-mapping-default-bind-pwd : none verify-certs : false |
$ dpconf get-server-prop -h host -p port property-name ... |
例如,透過執行此指令找出是否允許未認證的作業:
$ dpconf get-server-prop -h host -p port allow-unauthenticated-operations allow-unauthenticated-operations : true |
$ dpconf set-server-prop -h host -p port property:value ... |
例如,透過執行此指令禁止未認證的作業:
$ dpconf set-server-prop -h host -p port allow-unauthenticated-operations:false |
如果嘗試執行非法的變更,便無法完成變更。例如,如果將 allow-unauthenticated-operations 參數設為 f 而非 false,會產生下列錯誤:
$ dpconf set-server-prop -h host -p port allow-unauthenticated-operations:f The value "f" is not a valid value for the property "allow-unauthenticated-operations". Allowed property values: BOOLEAN The "set-server-prop" operation failed. |
請視需要重新啟動目錄代理伺服器實例以使變更生效。
如需有關重新啟動目錄代理伺服器的資訊,請參閱重新啟動目錄代理伺服器。
代理伺服器管理員是具有特權的管理員,相當於 UNIX® 系統上的超級使用者。在建立目錄代理伺服器實例時定義代理伺服器管理員項目。代理伺服器管理員的預設 DN 為 cn=Proxy Manager。
您可以檢視並變更代理伺服器管理員 DN 與密碼,如下列程序所示。
您可以使用 DSCC 執行此作業。如需相關資訊,請參閱目錄服務控制中心介面與 DSCC 線上說明。
尋找代理伺服器管理員的配置。
$ dpconf get-server-prop -h host -p port configuration-manager-bind-dn configuration-manager-bind-pwd configuration-manager-bind-dn : cn=proxy manager configuration-manager-bind-pwd : {3DES}U77v39WX8MDpcWVrueetB0lfJlBc6/5n |
代理伺服器管理員的預設值為 cn=proxy manager。傳回配置管理員密碼的雜湊值。
變更代理伺服器管理員的 DN。
$ dpconf set-server-prop -h host -p port configuration-manager-bind-dn:bindDN |
建立包含代理伺服器管理員密碼的檔案,並設定指向該檔案的特性。
$ dpconf set-server-prop -h host -p port configuration-manager-bind-pwd-file:filename |
目錄代理伺服器及其實體的大部分配置變更可在線上完成。某些變更需要重新啟動伺服器才會生效。如果變更下列清單中任何特性的配置,則必須重新啟動伺服器:
aci-data-view bind-dn client-cred-mode custom-distribution-algorithm db-name db-pwd db-url db-user distribution-algorithm ldap-address ldap-port ldaps-port listen-address listen-port load-balancing-algorithm num-bind-init num-read-init num-write-init number-of-search-threads number-of-threads number-of-worker-threads ssl-policy use-external-schema
特性的 rws 與 rwd 關鍵字表示對該特性所做的變更是否需要重新啟動伺服器。
如果特性具有 rws (讀取、寫入、靜態) 關鍵字,則變更特性後必須重新啟動伺服器。
如果特性具有 rwd (讀取、寫入、動態) 關鍵字,則動態執行對特性的修改作業 (不重新啟動伺服器)。
若要確定對特性的變更是否需要重新啟動伺服器,請執行下列指令:
$ dpconf help-properties | grep property-name
例如,若要確定變更 LDAP 資料來源的連結 DN 是否需要重新啟動伺服器,請執行下列指令:
$ dpconf help-properties | grep bind-dn connection-handler bind-dn-filters rwd STRING | any This property specifies a set of regular expressions. The bind DN of a client must match at least one regular expression in order for the connection to be accepted by the connection handler. (Default: any) ldap-data-source bind-dn rws DN | "" This property specifies the DN to use when binding to the LDAP data source. (Default: undefined)
若要確定在某項配置變更之後是否必須重新啟動伺服器,請執行下列指令:
$ dpconf get-server-prop -h host -p port is-restart-required
當您使用 dpadm 備份目錄代理伺服器時,會備份配置檔案與伺服器憑證。如果已執行目錄代理伺服器虛擬 ACI,也會備份 ACI。
目錄代理伺服器在每次伺服器成功啟動時,自動備份 conf.ldif 檔案。
您可以使用 DSCC 執行此作業。如需相關資訊,請參閱目錄服務控制中心介面與 DSCC 線上說明。
停止目錄代理伺服器實例。
$ dpadm stop instance-path |
備份目錄代理伺服器實例。
$ dpadm backup instance-path archive-dir |
archive-dir 目錄由 backup 指令建立,並且不可以在執行指令前存在。此目錄包含每個配置檔案與憑證的備份。
您可以使用 DSCC 執行此作業。如需相關資訊,請參閱目錄服務控制中心介面與 DSCC 線上說明。
您必須建立目錄代理伺服器實例,才能開始復原作業。