openldap syncrepl同步模式所有配置
OpenLDAP Syncrepl 同步模式的所有配置如下:
- 主服务器配置:
# Enable syncrepl
syncrepl rid=001
provider=ldap://ldap-master.example.com
type=refreshAndPersist
interval=00:00:05:00
searchbase="dc=example,dc=com"
filter="(objectClass=*)"
scope=sub
schemachecking=off
bindmethod=simple
binddn="cn=admin,dc=example,dc=com"
credentials=secret
retry="60 +"
timeout=1
- 从服务器配置:
# Enable syncrepl
syncrepl rid=001
provider=ldap://ldap-master.example.com
type=refreshAndPersist
interval=00:00:05:00
searchbase="dc=example,dc=com"
filter="(objectClass=*)"
scope=sub
schemachecking=off
bindmethod=simple
binddn="cn=admin,dc=example,dc=com"
credentials=secret
retry="60 +"
timeout=1
updatedn="cn=admin,dc=example,dc=com"
updateref=ldap://ldap-master.example.com
其中,主服务器和从服务器的配置基本相同,只有 updatedn 和 updateref 两个参数不同。主服务器不需要这两个参数,从服务器需要指定 updatedn 为管理员账号,并将 updateref 指向主服务器。其他参数解释如下:
syncrepl rid=001:指定同步 ID,可以自定义。provider=ldap://ldap-master.example.com:指定主服务器的 URL。type=refreshAndPersist:指定同步模式为增量同步。interval=00:00:05:00:指定同步间隔为 5 分钟。searchbase="dc=example,dc=com":指定同步的搜索基准 DN。filter="(objectClass=*)": 指定同步的搜索过滤条件为所有对象。scope=sub:指定同步的搜索范围为子树。schemachecking=off:关闭模式检查。bindmethod=simple:指定简单绑定方式。binddn="cn=admin,dc=example,dc=com":指定管理员账号的 DN。credentials=secret:指定管理员账号的密码。retry="60 +":指定同步失败后重试的时间间隔。timeout=1:指定连接超时时间。updatedn="cn=admin,dc=example,dc=com":只有从服务器需要指定此参数,指定管理员账号的 DN。updateref=ldap://ldap-master.example.com:只有从服务器需要指定此参数,指定主服务器的 URL。
原文地址: https://www.cveoy.top/t/topic/FsU 著作权归作者所有。请勿转载和采集!