主服务器配置示例:

  1. 安装OpenLDAP

  2. 配置slapd.conf文件

include     /etc/openldap/schema/core.schema
pidfile     /var/run/slapd.pid
argsfile    /var/run/slapd.args

moduleload syncprov.la

database    mdb
suffix      "dc=example,dc=com"
rootdn      "cn=admin,dc=example,dc=com"
rootpw      {SHA}hashed_password

access to * by * read

syncrepl rid=001
        provider=ldap://192.168.1.1
        type=refreshAndPersist
        retry="5 5 300 +"
        searchbase="dc=example,dc=com"
        filter="(objectClass=*)"
        scope=sub
        schemachecking=off
        bindmethod=simple
        binddn="cn=admin,dc=example,dc=com"
        credentials="password"
        tls_reqcert=never
  1. 启动OpenLDAP

从服务器配置示例:

  1. 安装OpenLDAP

  2. 配置slapd.conf文件

include     /etc/openldap/schema/core.schema
pidfile     /var/run/slapd.pid
argsfile    /var/run/slapd.args

moduleload syncprov.la

database    mdb
suffix      "dc=example,dc=com"
rootdn      "cn=admin,dc=example,dc=com"
rootpw      {SHA}hashed_password

access to * by * read

syncrepl rid=001
        provider=ldap://192.168.1.2
        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="password"
        tls_reqcert=never
  1. 启动OpenLDAP
openldap264 使用syncrepl主从同步模式主服务器和从服务器的配置示例

原文地址: http://www.cveoy.top/t/topic/MIL 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录