source: n4d-ldap/trunk/fuentes/replication/fichero @ 149

Last change on this file since 149 was 149, checked in by hectorgh, 4 years ago

adding project files

File size: 7.0 KB
Line 
1========================
2Pasos en el servidor
3========================
4cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
5dn: cn=config
6changetype: modify
7add: olcServerID
8olcServerID: 254
9EOF
10
11cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
12dn: cn=module{0},cn=config
13changetype: modify
14add: olcModuleLoad
15olcModuleLoad: {1}syncprov.la
16EOF
17
18cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
19dn: olcDatabase={0}config,cn=config
20changetype: modify
21add: olcRootPW
22olcRootPW: lliurex123
23EOF
24
25========================
26Pasos en el esclavo
27========================
28
29cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
30dn: cn=config
31changetype: modify
32add: olcServerID
33olcServerID: 1
34EOF
35
36cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
37dn: cn=module{0},cn=config
38changetype: modify
39add: olcModuleLoad
40olcModuleLoad: {1}syncprov.la
41EOF
42
43cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
44dn: olcDatabase={0}config,cn=config
45changetype: modify
46add: olcRootPW
47olcRootPW: lliurex123
48EOF
49
50================================================
51Pasos en los dos
52===============================================
53
54cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
55dn: cn=config
56changetype: modify
57replace: olcServerID
58olcServerID: 254 ldap://10.3.0.254/
59olcServerID: 1 ldap://10.3.0.1/
60EOF
61
62cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
63dn: olcOverlay=syncprov,olcDatabase={0}config,cn=config
64changetype: add
65objectClass: olcOverlayConfig
66objectClass: olcSyncProvConfig
67olcOverlay: syncprov
68EOF
69
70cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
71dn: olcDatabase={0}config,cn=config
72changetype: modify
73replace: olcSyncRepl
74olcSyncRepl: rid=254 provider=ldap://10.3.0.254/ binddn="cn=config"
75  bindmethod=simple credentials=lliurex123
76  searchbase="cn=config" type=refreshAndPersist
77  retry="5 5 300 5" timeout=1
78olcSyncRepl: rid=001 provider=ldap://10.3.0.1/ binddn="cn=config"
79  bindmethod=simple credentials=lliurex123
80  searchbase="cn=config" type=refreshAndPersist
81  retry="5 5 300 5" timeout=1
82-
83add: olcMirrorMode
84olcMirrorMode: TRUE
85EOF
86
87
88***************************************
89Apagar Slave
90***************************************
91
92######################################
93      Otro cliente
94######################################
95
96cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
97dn: cn=config
98changetype: modify
99add: olcServerID
100olcServerID: 2
101EOF
102
103cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
104dn: cn=module{0},cn=config
105changetype: modify
106add: olcModuleLoad
107olcModuleLoad: {1}syncprov.la
108EOF
109
110cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
111dn: olcDatabase={0}config,cn=config
112changetype: modify
113add: olcRootPW
114olcRootPW: lliurex123
115EOF
116
117
118-------------------------------------
119En el server y el nuevo slave
120-------------------------------------
121
122
123cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
124dn: cn=config
125changetype: modify
126replace: olcServerID
127olcServerID: 254 ldap://10.3.0.254/
128olcServerID: 1 ldap://10.3.0.1/
129olcServerID: 2 ldap://10.3.0.2/
130EOF
131
132========================================================
133ESTO EJECUTARLO EN EL SLAVE
134========================================================
135
136cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
137dn: olcOverlay=syncprov,olcDatabase={0}config,cn=config
138changetype: add
139objectClass: olcOverlayConfig
140objectClass: olcSyncProvConfig
141olcOverlay: syncprov
142EOF
143
144cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
145dn: olcDatabase={0}config,cn=config
146changetype: modify
147replace: olcSyncRepl
148olcSyncRepl: rid=254 provider=ldap://10.3.0.254/ binddn="cn=config"
149  bindmethod=simple credentials=lliurex123
150  searchbase="cn=config" type=refreshAndPersist
151  retry="5 5 300 5" timeout=1
152olcSyncRepl: rid=001 provider=ldap://10.3.0.1/ binddn="cn=config"
153  bindmethod=simple credentials=lliurex123
154  searchbase="cn=config" type=refreshAndPersist
155  retry="5 5 300 5" timeout=1
156olcSyncRepl: rid=002 provider=ldap://10.3.0.2/ binddn="cn=config"
157  bindmethod=simple credentials=lliurex123
158  searchbase="cn=config" type=refreshAndPersist
159  retry="5 5 300 5" timeout=1
160-
161add: olcMirrorMode
162olcMirrorMode: TRUE
163EOF
164========================================================
165END ESTO SOLO EJECUTARLO EN EL SLAVE
166========================================================
167
168========================================================
169ESTO EJECUTARLO EN EL MASTER
170========================================================
171
172
173cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
174dn: olcDatabase={0}config,cn=config
175changetype: modify
176replace: olcSyncRepl
177olcSyncRepl: rid=254 provider=ldap://10.3.0.254/ binddn="cn=config"
178  bindmethod=simple credentials=lliurex123
179  searchbase="cn=config" type=refreshAndPersist
180  retry="5 5 300 5" timeout=1
181olcSyncRepl: rid=001 provider=ldap://10.3.0.1/ binddn="cn=config"
182  bindmethod=simple credentials=lliurex123
183  searchbase="cn=config" type=refreshAndPersist
184  retry="5 5 300 5" timeout=1
185olcSyncRepl: rid=002 provider=ldap://10.3.0.2/ binddn="cn=config"
186  bindmethod=simple credentials=lliurex123
187  searchbase="cn=config" type=refreshAndPersist
188  retry="5 5 300 5" timeout=1
189EOF
190
191========================================================
192END ESTO EJECUTARLO EN EL MASTER
193========================================================
194
195
196###
197        TESTS
198###
199
200
201cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
202dn: cn=config
203changetype: modify
204replace: olcLogLevel
205olcLogLevel: 16384
206EOF
207
208
209cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
210dn: olcDatabase={1}hdb,cn=config
211changetype: modify
212replace: olcRootDN
213olcRootDN: cn=admin,dc=lliurex
214EOF
215
216cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
217dn: olcDatabase={1}hdb,cn=config
218changetype: modify
219delete: olcRootDN
220-
221add: olcRootDN
222olcRootDN: cn=admin,dc=lliurex,dc=net
223EOF
224
225
226cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
227dn: cn=config
228changetype: modify
229delete: olcLogLevel
230EOF
231
232cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
233dn: cn=config
234changetype: modify
235replace: olcLogLevel
236olcLogLevel: 12354
237EOF
238
239
240ldapsearch -Y EXTERNAL -H ldapi:// -b cn=config | less
241
242ldapsearch -x -LLL -H ldapi:// -s base -b 'cn=config' contextCSN
243###
244
245
246==============================================
247Replicacion de datos
248==============================================
249
250
251cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
252dn: olcDatabase={1}hdb,cn=config
253changetype: modify
254add: olcLimits
255olcLimits: dn.exact="cn=admin,dc=nodomain" time.soft=unlimited
256  time.hard=unlimited size.soft=unlimited size.hard=unlimited
257-
258add: olcSyncRepl
259olcSyncRepl: rid=004 provider=ldap://10.3.0.254/ binddn="cn=admin,dc=ma5,dc=lliurex,dc=net"
260  bindmethod=simple credentials=lliurex searchbase="dc=ma5,dc=lliurex,dc=net"
261  type=refreshOnly interval=00:00:00:10 retry="5 5 300 5" timeout=1
262olcSyncRepl: rid=005 provider=ldap://ldap2/ binddn="cn=admin,dc=ma5,dc=lliurex,dc=net"
263  bindmethod=simple credentials=lliurex searchbase="dc=ma5,dc=lliurex,dc=net"
264  type=refreshOnly interval=00:00:00:10 retry="5 5 300 5" timeout=1
265-
266add: olcDbIndex
267olcDbIndex: entryUUID  eq
268-
269add: olcDbIndex
270olcDbIndex: entryCSN  eq
271-
272add: olcMirrorMode
273olcMirrorMode: TRUE
274EOF
275
276cat <<EOF | ldapmodify -Y EXTERNAL -H ldapi:///
277dn: olcOverlay=syncprov,olcDatabase={1}hdb,cn=config
278changetype: add
279objectClass: olcOverlayConfig
280objectClass: olcSyncProvConfig
281olcOverlay: syncprov
282EOF
283
284
Note: See TracBrowser for help on using the repository browser.