ODSEE : Replications Setup

# Set Path

$ export PATH=/appl/ldap/dsee7/bin:/appl/ldap/dsee7/dsrk/bin:$PATH

#Instance Creation

$ dsadm create -p 10389 -P 10636 -w ~/dirt /appl/ldap/master1
$ dsadm create -p 11389 -P 11636 -w ~/dirt /appl/ldap/master2
$ dsadm create -p 12389 -P 12636 -w ~/dirt /appl/ldap/replica1
$ dsadm create -p 13389 -P 13636 -w ~/dirt /appl/ldap/hub1
$ dsadm create -p 14389 -P 14636 -w ~/dirt /appl/ldap/replica2
$ dsadm create -p 15389 -P 15636 -w ~/dirt /appl/ldap/hub2

# Start an instance

$ dsadm start /appl/ldap/master1
$ dsadm start /appl/ldap/master2
$ dsadm start /appl/ldap/replica1
$ dsadm start /appl/ldap/replica2
$ dsadm start /appl/ldap/hub1
$ dsadm start /appl/ldap/hub2

# Create a suffix

$ dsconf create-suffix -p 10389 -w ~/dirt -e dc=example,dc=com
$ dsconf create-suffix -p 11389 -w ~/dirt -e dc=example,dc=com
$ dsconf create-suffix -p 12389 -w ~/dirt -e dc=example,dc=com
$ dsconf create-suffix -p 13389 -w ~/dirt -e dc=example,dc=com
$ dsconf create-suffix -p 14389 -w ~/dirt -e dc=example,dc=com
$ dsconf create-suffix -p 15389 -w ~/dirt -e dc=example,dc=com

# Populate the suffix with LDIF data.

$ dsconf import -p 10389 -i -w ~/dirt -e /appl/ldap/dsee7/resources/ldif/Example.ldif dc=example,dc=com

# Search for data in the new instance

$ ldapsearch -p 10389 -b dc=example,dc=com “(uid=ajensen)” mail

# Import Self-Signed Certificate on other masters

$ dsadm show-cert -F der -o certfile-m1 /appl/ldap/master1 defaultCert
$ dsadm show-cert -F der -o certfile-m2 /appl/ldap/master2 defaultCert
$ dsadm show-cert -F der -o certfile-rep1 /appl/ldap/replica1 defaultCert
$ dsadm show-cert -F der -o certfile-rep2 /appl/ldap/replica2 defaultCert
$ dsadm show-cert -F der -o certfile-hub1 /appl/ldap/hub1 defaultCert
$ dsadm show-cert -F der -o certfile-hub2 /appl/ldap/hub2 defaultCert
$ dsadm add-cert –ca /appl/ldap/master1 “ds2 Repl Manager Cert m2″ certfile-m2
$ dsadm add-cert –ca /appl/ldap/master1 “ds2 Repl Manager Cert hub1″ certfile-hub1
$ dsadm add-cert –ca /appl/ldap/master2 “ds1 Repl Manager Cert m1″ certfile-m1
$ dsadm add-cert –ca /appl/ldap/master2 “ds2 Repl Manager Cert hub2″ certfile-hub2
$ dsadm add-cert –ca /appl/ldap/hub1 “ds1 Repl Manager Cert m1″ certfile-m1
$ dsadm add-cert –ca /appl/ldap/hub1 “ds1 Repl Manager Cert rep1″ certfile-rep1
$ dsadm add-cert –ca /appl/ldap/hub2 “ds1 Repl Manager Cert m2″ certfile-m2
$ dsadm add-cert –ca /appl/ldap/hub2 “ds1 Repl Manager Cert rep2″ certfile-rep2
$ dsadm add-cert –ca /appl/ldap/replica1 “ds1 Repl Manager Cert hub” certfile-hub1
$ dsadm add-cert –ca /appl/ldap/replica2 “ds1 Repl Manager Cert hub” certfile-hub2
$ dsadm restart /appl/ldap/master1
$ dsadm restart /appl/ldap/master2
$ dsadm restart /appl/ldap/hub1
$ dsadm restart /appl/ldap/hub2
$ dsadm restart /appl/ldap/replica1
$ dsadm restart /appl/ldap/replica2

# Enable Replication

$ dsconf enable-repl -i -D “cn=directory manager” -w ~/dirt -p 10389 -d 1 master dc=example,dc=com
$ dsconf enable-repl -i -D “cn=directory manager” -w ~/dirt -p 11389 -d 2 master dc=example,dc=com
$ dsconf enable-repl -i -D “cn=directory manager” -w ~/dirt -p 12389 consumer dc=example,dc=com
$ dsconf enable-repl -i -D “cn=directory manager” -w ~/dirt -p 13389 hub dc=example,dc=com
$ dsconf enable-repl -i -D “cn=directory manager” -w ~/dirt -p 14389 consumer dc=example,dc=com
$ dsconf enable-repl -i -D “cn=directory manager” -w ~/dirt -p 15389 hub dc=example,dc=com

# Create Replication Agreements between masters 1 to master2 and other replicas.

$ dsconf create-repl-agmt -i -p 10389 -D “cn=directory manager” -w ~/dirt –auth-protocol “ssl-simple” “dc=example,dc=com” localhost:11636
$ dsconf create-repl-agmt -i -p 10389 -D “cn=directory manager” -w ~/dirt –auth-protocol “ssl-simple” “dc=example,dc=com” localhost:13636
$ dsconf create-repl-agmt -i -p 11389 -D “cn=directory manager” -w ~/dirt –auth-protocol “ssl-simple” “dc=example,dc=com” localhost:10636
$ dsconf create-repl-agmt -i -p 11389 -D “cn=directory manager” -w ~/dirt –auth-protocol “ssl-simple” “dc=example,dc=com” localhost:15636
$ dsconf create-repl-agmt -i -p 13389 -D “cn=directory manager” -w ~/dirt –auth-protocol “ssl-simple” “dc=example,dc=com” localhost:12636
$ dsconf create-repl-agmt -i -p 15389 -D “cn=directory manager” -w ~/dirt –auth-protocol “ssl-simple” “dc=example,dc=com” localhost:14636

# Initialize

$ dsconf init-repl-dest -i -p 10389 -D “cn=directory manager” -w ~/dirt -v dc=example,dc=com localhost:11636
$ dsconf init-repl-dest -i -p 10389 -D “cn=directory manager” -w ~/dirt -v dc=example,dc=com localhost:13636
$ dsconf init-repl-dest -i -p 11389 -D “cn=directory manager” -w ~/dirt -v dc=example,dc=com localhost:15636
$ dsconf init-repl-dest -i -p 13389 -D “cn=directory manager” -w ~/dirt -v dc=example,dc=com localhost:12636
$ dsconf init-repl-dest -i -p 15389 -D “cn=directory manager” -w ~/dirt -v dc=example,dc=com localhost:14636

# Check Replication

$ dsconf list-repl-agmts -i -p 10389 -D “cn=directory manager” -w ~/dirt -v dc=example,dc=com
$ dsconf list-repl-agmts -i -p 11389 -D “cn=directory manager” -w ~/dirt -v dc=example,dc=com
$ dsconf list-repl-agmts -i -p 13389 -D “cn=directory manager” -w ~/dirt -v dc=example,dc=com
$ dsconf list-repl-agmts -i -p 15389 -D “cn=directory manager” -w ~/dirt -v dc=example,dc=com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s