6.3. 使用命令行准备 hub 的新消费者
要准备 consumer.example.com 主机,请启用复制。这个过程:
- 在复制拓扑中配置此服务器的角色
- 定义复制的后缀
- 创建复制管理器帐户,hub 用来连接到此主机
在您要添加到复制拓扑的消费者上执行这个步骤。
前提条件
- 已安装 Directory 服务器实例。详情请参阅 .inf 文件在命令行中设置新实例。
-
dc=example,dc=com后缀的数据库存在。
流程
为
dc=example,dc=com后缀启用复制:# dsconf -D "cn=Directory Manager" ldap://consumer.example.com replication enable --suffix "dc=example,dc=com" --role "consumer" --bind-dn "cn=replication manager,cn=config" --bind-passwd "password"此命令将
consumer.example.com主机配置为dc=example,dc=com后缀的使用者。此外,命令还会创建具有指定密码的cn=replication managercn=config用户,并允许此帐户将后缀更改复制到此主机。
验证
显示复制配置:
# dsconf -D "cn=Directory Manager" ldap://consumer.example.com replication get --suffix "dc=example,dc=com" dn: cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config ... nsDS5ReplicaBindDN: cn=replication manager,cn=config nsDS5ReplicaRoot: dc=example,dc=com nsDS5ReplicaType: 2 ...这些参数表示:
-
nsDS5ReplicaBindDN指定复制管理器帐户。 -
nsDS5ReplicaRoot设置复制的后缀。 -
nsDS5ReplicaType设置为2定义此主机是消费者。
-