5.6. 为参考完整性配置范围


如果删除了条目,则会删除或修改对其的引用以反映更改。当这个更新适用于所有条目和所有组时,它可能会影响性能,并防止对所选子树限制引用完整性的灵活性。定义 范围 可以解决这个问题。
例如,可能有一个后缀 dc=example,dc=com,包含两个子树: ou=active users,dc=example,dc=comou=deleted users,dc=example,dc=com。对于参考完整性,不应处理 已删除用户 中的条目。

5.6.1. 控制引用完整性范围的参数

以下三个参数可用于定义 参考完整性后插件配置中的 范围:
nsslapd-pluginEntryScope
此多值参数控制已删除或重命名的条目的范围。它定义了 参考完整性后 插件查找用户条目删除或重命名操作的子树。如果用户被删除或重命名在定义的子树下不存在,则插件会忽略该操作。参数允许您指定插件应应用该操作的数据库分支。
nsslapd-pluginExcludeEntryScope
这个参数还控制已删除或重命名的条目的范围。它定义了 参考完整性后插件会 忽略任何删除或重命名用户的操作的子树。
nsslapd-pluginContainerScope
此参数控制更新引用的组范围。删除用户后,参考完整性后 插件会查找用户所属的组并相应地更新它们。参数指定插件搜索用户所属的组的分支。参考完整性后 插件仅更新指定容器分支下的组,并保留所有其他组没有更新。

5.6.2. 使用命令行显示参考完整性范围

以下命令显示如何使用命令行显示范围设置:
# dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity show
...
nsslapd-pluginEntryScope: DN
nsslapd-pluginExcludeEntryScope: DN
nsslapd-pluginContainerScope: DN

5.6.3. 使用 Web 控制台显示参考完整性范围

以下流程演示了如何使用 Web 控制台显示范围设置:
  1. 在 web 控制台中打开 Directory Server 用户界面。请参阅 第 1.4 节 “使用 Web 控制台登录到目录服务器”
  2. 选择实例。
  3. 打开 Plugins 菜单。
  4. 选择 参考完整性 插件。
  5. 有关当前配置的范围,请参阅 Entry ScopeExclude Entry Scope、和 Container Scope 字段。

5.6.4. 使用命令行配置参考完整性范围

使用命令行配置引用完整性范围:
  1. 另外,还可显示范围设置。请参阅 第 5.6.2 节 “使用命令行显示参考完整性范围”
  2. 以下命令显示如何使用命令行配置单个引用完整性范围设置:
    • 要设置可分辨名称(DN):
      • nsslapd-pluginEntryScope 参数:
        # dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity set --entry-scope="DN"
      • nsslapd-pluginExcludeEntryScope 参数:
        # dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity set --exclude-entry-scope="DN"
      • nsslapd-pluginContainerScope 参数:
        # dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity set --container-scope="DN"
    • 删除 DN:
      • nsslapd-pluginEntryScope 参数中:
        # dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity set --entry-scope=delete
      • nsslapd-pluginExcludeEntryScope 参数中:
        # dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity set --exclude-entry-scope=delete
      • nsslapd-pluginContainerScope 参数中:
        # dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity set --container-scope=delete
  3. 重启实例:
    # dsctl instance_name restart

5.6.5. 使用 Web 控制台配置参考完整性范围

使用 Web 控制台配置引用完整性范围:
  1. 在 web 控制台中打开 Directory Server 用户界面。请参阅 第 1.4 节 “使用 Web 控制台登录到目录服务器”
  2. 选择实例。
  3. 选择 Plugins 菜单。
  4. 选择 参考完整性 插件。
  5. Entry ScopeExclude Entry ScopeContainer Scope 字段中设置范围。
  6. 单击 Save Config
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.