创建目录代理服务器实例时,将在您指定的路径中创建此实例所需的文件和目录。
可使用 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(read(读)、write(写)、static(静态))关键字,则在更改属性后必须重新启动服务器。
如果某个属性具有 rwd(read(读)、write(写)、dynamic(动态))关键字,则可动态完成对该属性的修改操作(无需重新启动服务器)。
要确定对某个属性的更改是否需要重新启动服务器,请运行以下命令:
$ 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 联机帮助。
在启动恢复操作之前,必须先创建一个目录代理服务器实例。