我正在尝试使用Openldap动态配置。我在尝试添加以下内容时出现错误:
add: olcMirrorMode
olcMirrorMode: TRUE
error(80)
additional info: <olcMirrorMode> database is not a shadow谁能解释一下如何消除这个错误,以及我需要什么设置才能将olcMirrorMode添加到守护程序配置中?
谢谢:-)
发布于 2011-09-13 20:15:56
我也遇到过类似的问题,所以希望这篇文章能有所帮助。
Mirrormode应该只设置在您想要复制的数据库上,并且olcMirrorMode应该在您设置了任何和所有syncrepl命令之后设置。
假设您正在尝试执行n-master replication,请设置您的syncrepl语句。
完成后,打开镜像模式。对我来说,问题是我必须修改/添加,而不是直接添加,才能让它接受mirrormode:
dn: olcDatabase={1}bdb,cn=config
changetype: modify
add: olcMirrorMode
olcMirrorMode: TRUE发布于 2012-03-08 05:47:37
在第一台服务器上配置OpenLDAP,如下所示。
[root@dhcp200 ~]# cat /etc/openldap/slapd.conf |grep -v '^#' |grep -v '^$'
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/ppolicy.schema
allow bind_v2
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
modulepath /usr/lib64/openldap
moduleload syncprov.la
loglevel sync
database bdb
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
rootpw secret
directory /var/lib/ldap
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
index entryCSN eq
index entryUUID eq
serverID 2
syncrepl rid=001
provider=ldap://192.168.122.204:389
bindmethod=simple
binddn="cn=Manager,dc=example,dc=com"
credentials=secret
searchbase="dc=example,dc=com"
attrs=",+"
schemachecking=off
type=refreshAndPersist
retry="1 +"
mirrormode TRUE
overlay syncprov
syncprov-checkpoint 100 10
syncprov-sessionlog 100在第二台服务器中配置slapd.conf,如下所示。
[root@test6 ~]# cat /etc/openldap/slapd.conf |grep -v '^#' |grep -v '^$'
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/ppolicy.schema
allow bind_v2
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
modulepath /usr/lib64/openldap
moduleload syncprov.la
loglevel sync
database bdb
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
rootpw secret
directory /var/lib/ldap
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
index entryCSN eq
index entryUUID eq
serverID 1
syncrepl rid=001
provider=ldap://192.168.122.200:389
bindmethod=simple
binddn="cn=Manager,dc=example,dc=com"
credentials=secret
searchbase="dc=example,dc=com"
attrs=",+"
schemachecking=off
type=refreshAndPersist
retry="1 +"
mirrormode TRUE
overlay syncprov
syncprov-checkpoint 100 10
syncprov-sessionlog 100如果要使用cn=config方法,请使用以下命令将其转换为cn=config格式
# rm -rvf /etc/openldap/slapd.d/
# mkdir /etc/openldap/slapd.d/
# slaptest -f slapd.conf -F /etc/openldap/slapd.d/
# rm slapd.conf
# chown -R ldap:ldap /etc/openldap/slapd.d/在两台服务器上启动slapd的服务。
# service slapd starthttps://stackoverflow.com/questions/6792212
复制相似问题