Setup of Centos Directory Server Read-Write Replicas
Contents |
1 Introduction
This How-To document decribes the setup of two Centos DS Read-Write Replicas.
2 Preparation
Set up two Centos Directory Servers as described in How to setup the CentOS Directory Server (389 Directory Server)
This Example uses the following parameters
| Hostname | Domain | Database | IP Address | Port | Replica Type | Replication Bind DN |
| centos-ds-1 | mydomain.de | dc=mydomain,dc=de | 10.203.1.100 | 389 | Read-Write Replica | cn=Replication Manager,cn=config |
| centos-ds-2 | mydomain.de | dc=mydomain,dc=de | 10.203.105.100 | 389 | Read-Write Replica | cn=Replication Manager,cn=config |
3 Install the CA Certficate of the other server
Log in the first server as user root. Then copy the CA Certficate from the second server and install it:
scp 10.203.105.100:/etc/dirsrv/slapd-centos-ds-2/cacert.asc /tmp certutil -A -d /etc/dirsrv/slapd-centos-ds-1 -n "CAcert of centos-ds-2" -t "CT,," -a -i /tmp/cacert.asc service dirsrv restart && service dirsrv-admin restart
Log in the second server as user root. Then copy the CA Certficate from the first server and install it:
scp 10.203.1.100:/etc/dirsrv/slapd-centos-ds-1/cacert.asc /tmp certutil -A -d /etc/dirsrv/slapd-centos-ds-2 -n "CAcert of centos-ds-1" -t "CT,," -a -i /tmp/cacert.asc service dirsrv restart && service dirsrv-admin restart
4 Creating the Supplier Bind DN Entries on both Servers
Create a replicationmanager.ldif file:
dn: cn=replication manager,cn=config objectClass: inetorgperson objectClass: person objectClass: top objectClass: organizationalPerson cn: replication manager sn: RM userPassword: REPLICATION_MANAGER_PASSWORD passwordExpirationTime: 20380119031407Z
Add the entry to the first server
ldapmodify -a -x -D "cn=Directory Manager" -W -H ldap://10.203.1.100 -f replicationmanager.ldif
Add the entry to the second server
ldapmodify -a -x -D "cn=Directory Manager" -W -H ldap://10.203.105.100 -f replicationmanager.ldif
5 Enable Replication Changelog on both Servers
Go 'Configuration' tab in the Directory Server Console and select 'Replication' in the navigation tree. Check 'Enable Changelog', set the changlog directory by clicking the 'Use default' button and choose a maximum changelog age. Click 'Save' when done.
Do the same on the second server.
6 Enable Replica on both Servers
Expand the 'Replication' subtree and select 'userRoot'. Check 'Enable Replica' and choose 'Multiple Master' as the replica role. Assign a unique replica ID. Enter the Replication Bind DN in the field 'Enter a new Supplier DN' and click add. Click 'Save' when done.
Do the same on the second server but set the Replica ID to 2.
7 Setting up the Replication Agreements on both Servers
Expand the 'Data' then rightclick on 'dc=mydomain,cn=de' while 'userRoot' is still highlighted. Select 'New Replication Agreement..' from the pop-up menu to start the wizard.
7.1 Name and Description
Choose 'centos-ds-2' and 'mydoamin.de to centos-ds-2' on the first server and 'centos-ds-1' and 'mydoamin.de to centos-ds-1' on the second server.
7.2 Source and Destination
Enter the IP 10.203.105.100:389 as the consumer on the first server and IP 10.203.1.100 on the second server. Enter the replication Bind DN and password as defined in the first step.
7.3 Replicated Attributes
Do not enable fractional relication. Replicate all attributes.
7.4 Replication Schedule
Keep Replica allways in sync.
7.5 Initialize Consumer
| On the first server: Initialize the other server | On the second server: Do NOT initialize the other server |
|
|
7.6 Summary
Review the agreement settings before clicking done.
8 Status
Go to 'Status' tab, click the 'Replication Status' item and verfiy that replication is working.










