Here I am using Master-Slave replication using Slurpd. Below are the participating systems
Replication to work properly Master and salve system initially should have exact number of entries. Take a dump of all the entries in the Master server using the below command and import it to the slave.
Go to the salve ldap1.fireblade.com and import it using ldapadd.
Open /etc/openldap/sldapd.conf in master server ldap-master.fireblade.com and add the below entries
save the configuration and exit the file.
Open /etc/openldap/sldapd.conf in the salve server ldap1.fireblade.com and add the following entries.
Save the configuration and restart the ldap service in both the server and client
Test the configuration by create a new user in the master server and test whether it appears in the slave with in 5 minutes.
Debugging
Statrt slapd and slurpd in debug mode to troubleshoot the issues
1. ldap-master.fireblade.com (Master Server) 2. ldap1.fireblade.com (client Server)
Replication to work properly Master and salve system initially should have exact number of entries. Take a dump of all the entries in the Master server using the below command and import it to the slave.
# slapcat > master.ldif
Go to the salve ldap1.fireblade.com and import it using ldapadd.
# ldapadd -D "cn=Manager,dc=dc1,dc=fireblade,dc=com" -W -x -f initial.ldifAt this point both master and slave has the exact amount of data. Let's start the replication configuration.
Open /etc/openldap/sldapd.conf in master server ldap-master.fireblade.com and add the below entries
- Replication will happen in the every 5 minutes.
# Keep the sapce in front of binddn as it is bbecause replica uri=ldap://ldap1.fireblade.com bindmethod=simple binddn="cn=manager,dc=fireblade,dc=com" credentials=redhat
save the configuration and exit the file.
Open /etc/openldap/sldapd.conf in the salve server ldap1.fireblade.com and add the following entries.
updatedn "cn=manager,dc=fireblade,dc=com"
updateref ldap://ldap-master.fireblade.com:389
Save the configuration and restart the ldap service in both the server and client
# service ldap restart
Test the configuration by create a new user in the master server and test whether it appears in the slave with in 5 minutes.
Debugging
Statrt slapd and slurpd in debug mode to troubleshoot the issues
# slapd -d 1
# slurpd -d 1
No comments:
Post a Comment