配置雙主複製功能,在主1和主2上執行均下麵的步驟 vim syncprov_mod.ldif dn: cn=module,cn=configobjectClass: olcModuleListcn: moduleolcModulePath: /usr/lib64/openldapolcModuleL ...
配置雙主複製功能,在主1和主2上執行均下麵的步驟
vim syncprov_mod.ldif
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulePath: /usr/lib64/openldap
olcModuleLoad: syncprov.la
ldapadd -Y EXTERNAL -H ldapi:/// -f syncprov_mod.ldif
vim configrep.ldif
dn: cn=config
changetype: modify
replace: olcServerID
olcServerID: 1 ldap://openldap-01:389
olcServerID: 2 ldap://openldap-02:389
dn: olcDatabase={2}hdb,cn=config
changetype: modify
add: olcSyncRepl
olcSyncRepl: rid=001
provider=ldap://openldap-02:389
binddn="cn=Manager,dc=jackcui,dc=com"
bindmethod=simple
credentials=密碼
searchbase="dc=jackcui,dc=com"
type=refreshAndPersist
retry="5 5 300 5"
timeout=1
olcSyncRepl: rid=002
provider=ldap://openldap-02:389
binddn="cn=Manager,dc=jackcui,dc=com"
bindmethod=simple
credentials=密碼
searchbase="dc=jackcui,dc=com"
type=refreshAndPersist
retry="5 5 300 5"
timeout=1
add: olcMirrorMode
olcMirrorMode: TRUE
dn: olcOverlay=syncprov,olcDatabase={2}hdb,cn=config
changetype: add
objectClass: olcOverlayConfig
objectClass: olcSyncProvConfig
olcOverlay: syncprov
ldapmodify -Y EXTERNAL -H ldapi:/// -f configrep.ldif