Skip to content

Mongo Cluster

Wassim Dhif edited this page Mar 18, 2016 · 1 revision

bash

/etc/init.d/mongodb stop
mkdir -p /data/rX
mongod --dbpath /data/rX --replSet transcode --smallfiles &

mongo shell

cfg = {_id : "transcode",members : [{ _id : 1, host : "mongo1"},{ _id : 2, host : "mongo2"},{ _id : 3, host : "mongo3"}]}
rs.initiate(cfg)

Clone this wiki locally