5.2. 使用临时复制管理器帐户初始化新的服务器
基于证书的验证使用存储在 目录中的证书。但是,在初始化新服务器之前,server2.example.com 上的数据库为空,并且具有关联证书的帐户不存在。因此,在初始化数据库前无法使用证书复制。您可以使用临时复制管理器帐户初始化 server2.example.com 来解决此问题。
前提条件
-
您已在
server2.example.com上安装了 Directory 服务器实例。详情请参阅 .inf 文件在命令行中设置新实例。 -
dc=example,dc=com后缀的数据库存在。 -
您在服务器
server1.example.com和server2.example.com上的目录服务器中启用了 TLS 加密。
流程
在
server2.example.com上,为dc=example,dc=com后缀启用复制:# dsconf <server2_instance_name> replication enable --suffix "dc=example,dc=com" --role "supplier" --replica-id 2 --bind-dn "cn=replication manager,cn=config" --bind-passwd "password"此命令将
server2.example.com主机配置为dc=example,dc=com后缀的供应商,并将此主机的副本 ID 设置为2。另外,命令创建一个带有指定密码的临时 cn=replication managercn=config用户,并允许此帐户将后缀的更改复制到此主机上。副本 ID 必须是拓扑中所有供应商的后缀
1到65534之间的唯一整数。在
server1.example.com上:启用复制:
# dsconf <server1_instance_name> replication enable --suffix="dc=example,dc=com" --role="supplier" --replica-id="1"创建一个临时复制协议,它使用上一步中的临时帐户进行身份验证:
# dsconf <server1_instance_name> repl-agmt create --suffix="dc=example,dc=com" --host="server1.example.com" --port=636 --conn-protocol=LDAPS --bind-dn="cn=Replication Manager,cn=config" --bind-passwd="password" --bind-method=SIMPLE --init temporary_agreement
验证
验证初始化是否成功:
# dsconf <server1_instance_name> repl-agmt init-status --suffix "dc=example,dc=com" temporary_agreement Agreement successfully initialized.