8.2. 使用命令行创建新数据库链接
您可以使用 dsconf chaining link-create 命令创建新的数据库链接。
先决条件
- 您已在 web 控制台中打开了 Directory Server 用户界面并选择了实例。
流程
创建新数据库链接 :
dsconf -D "cn=Directory Manager" ldap://server.example.com chaining link-create --suffix="ou=Customers,dc=example,dc=com" --server-url="ldap://remote_server.example.com:389" --bind-mech=SIMPLE --bind-dn="cn=proxy_user,cn=config" --bind-pw="password" "example_chain_name"
# dsconf -D "cn=Directory Manager" ldap://server.example.com chaining link-create --suffix="ou=Customers,dc=example,dc=com" --server-url="ldap://remote_server.example.com:389" --bind-mech=SIMPLE --bind-dn="cn=proxy_user,cn=config" --bind-pw="password" "example_chain_name"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
通过使用这个命令,您可以为 ou=Customers,dc=example,dc=com 创建名为 example_chain_name 的数据库链接,该链接指向 ldap://remote_server.example.com:389 服务器并使用指定的绑定 DN 和 密码进行身份验证。您必须将 bind-mech 设置为 SIMPLE (对于基于证书的身份验证的EXTERNAL )或 GSSAPI 用于 kerberos 身份验证。
- 显示创建数据库链接时可以设置的其他设置:
dsconf -D "cn=Directory Manager" ldap://server.example.com chaining link-create --help
# dsconf -D "cn=Directory Manager" ldap://server.example.com chaining link-create --help
注意
要授予 proxy_user 访问数据的权限,您必须在远程服务器上在 dc=example,dc=com 后缀中创建 proxy ACI 条目。
验证
显示新数据库链接:
dsconf -D "cn=Directory Manager" ldap://server.example.com chaining link-create --suffix="ou=Customers,dc=example,dc=com" --server-url="ldap://remote_server.example.com:389" --bind-mech=SIMPLE --bind-dn="cn=proxy_user,cn=config" --bind-pw="password" "example_chain_name"
# dsconf -D "cn=Directory Manager" ldap://server.example.com chaining link-create --suffix="ou=Customers,dc=example,dc=com" --server-url="ldap://remote_server.example.com:389" --bind-mech=SIMPLE --bind-dn="cn=proxy_user,cn=config" --bind-pw="password" "example_chain_name"Copy to Clipboard Copied! Toggle word wrap Toggle overflow