centos7 openldap双主部署

https://blog.csdn.net/fanren224/article/details/79707206

亲测 可用。

vi mod_syncprov.ldif

# create new
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulePath: /usr/lib64/openldap
olcModuleLoad: syncprov.la

vim syncprov.ldif 

# create new
dn: olcOverlay=syncprov,olcDatabase={2}hdb,cn=config
objectClass: olcOverlayConfig
objectClass: olcSyncProvConfig
olcOverlay: syncprov
olcSpSessionLog: 100

vim master02.ldif
 

# create new
dn: cn=config
changetype: modify
replace: olcServerID
# specify uniq ID number on each server
olcServerID: 1                    

dn: olcDatabase={2}hdb,cn=config
changetype: modify
add: olcSyncRepl
olcSyncRepl: rid=001
   provider=ldap://172.20.85.29:389/             
   bindmethod=simple
   binddn="cn=admin,dc=baofoo,dc=com"
   credentials=baofoo@64             
   searchbase="dc=baofoo,dc=com"
   scope=sub
   schemachecking=on
   type=refreshAndPersist
   retry="30 5 300 3"
   interval=00:00:05:00
-
add: olcMirrorMode
olcMirrorMode: TRUE

dn: olcOverlay=syncprov,olcDatabase={2}hdb,cn=config
changetype: add
objectClass: olcOverlayConfig
objectClass: olcSyncProvConfig
olcOverlay: syncprov

您可以选择一种方式赞助本站