Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cd ~
- cd mongo-bdw
- mkdir config
- mongod --configsvr --dbpath ~/mongo-bdw/config --port 20001
- mongos --configdb jarvis:20001 --port 27017 --chunkSize 1
- mkdir -p rs1-0 rs1-1 rs1-2
- mongod --port 27010 --dbpath ~/mongo-bdw/rs1-0 --replSet rs1 --smallfiles --noprealloc
- mongod --port 27011 --dbpath ~/mongo-bdw/rs1-1 --replSet rs1 --smallfiles --noprealloc
- mongod --port 27012 --dbpath ~/mongo-bdw/rs1-2 --replSet rs1 --smallfiles --noprealloc
- rs.initiate()
- rs.add("<hostname:27011>")
- rs.add("<hostname:27012>")
- rs.status()
- mongo
- #nomongo
- sh.addShard("rs0/jarvis:27000,jarvis:27001,jarvis:27002")
- sh.addShard("rs1/jarvis:27010,jarvis:27011,jarvis:27012")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement