I recently had a project where I needed to provide replication for a CentOS 5 LDAP server. The slave (consumer) was going to be running CentOS 6. This post assumes you already have (2) working LDAP servers, fully resolvable, and all ldapsearch queries respond appropriately.
For clarification:
Master (Provider in LDAP terms) - CentOS 5 server
Slave (Consumer in LDAP terms) - CentOS 6 server
On the Master
:
Create a new account named replicate
. Give the replicate
account a password and make sure you can fully query the account from the Slave
using ldapsearch
.
An example ldapsearch
to run from the Slave
:
1
|
|
Add the following to slapd.conf
on the Master
1 2 3 4 5 6 7 8 |
|
On the Slave
:
Create the cn=module{0}.ldif
file with the following contents
1 2 3 4 5 6 7 8 |
|
Make sure the ldap
user is the owner of the file
1
|
|
Append the following to the olcDatabase={2}bdb.ldif
file replacing ‘password’ with the password you created for the replicate user
1 2 3 4 5 6 7 8 9 |
|
If you hit problems use the following command to start the server in debug mode with logging to the console.
1
|
|