CDC setup in Mongo
CDC Setup on Linux
Section titled βCDC Setup on Linuxβ1. Need to set the following in mongod.conf configuration file.
replSetName: βreplica_nameβopLogSizeMB: <integer>replSetName - You can give any name. Use command rs.status() to get this replica set name.opLogSizeMB - When you start a replica set member for the first time, MongoDB creates an oplog with a default size. Default size is 5% of physical memory.Lower bound is 50MB and the upper bound is 50GB. To set this please refer to thisblog.- Set the replication name and oplog size
- replSetName: βreplica_nameβ
- opLogSizeMB: <integer>
- replSetName - You can give any name. Use command rs.status() to get this replica set name.
- opLogSizeMB - When you start a replica set member for the first time, MongoDB creates an oplog with a default size. Default size is 5% of physical memory.
- Lower bound is 50MB and the upper bound is 50GB. To set this please refer to this blog.
2. After setting up the above parameters restart the mongoDB.
sudo service mongod restartCheck the status
sudo service mongod status3. Now initiate the replica set run query
rs.initiate({_id: "replica_name", members: [{_id: 0, host: "<host_address>:27017"}]})βThis will return { βokβ : 1 }