Guest User

Untitled

a guest
Sep 23rd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # shards
  4. mkdir mongo1 && mongod --shardsvr --dbpath mongo1/ --smallfiles --noprealloc --port 30000 > mongo1.log &
  5. mkdir mongo2 && mongod --shardsvr --dbpath mongo2/ --smallfiles --noprealloc --port 30100 > mongo2.log &
  6.  
  7. # config server
  8. mkdir configdb1 && mongod --configsvr --dbpath configdb1/ --smallfiles --noprealloc --port 50000 > mongoconfigsvr1.log &
  9.  
  10. # mongos
  11. read -p "Press enter when config server is up to launch mongos.. "
  12. mongos --configdb localhost:50000 --port 55000 > mongos1.log &
  13.  
  14. read -p "Press enter when mongos is up to add shards.. "
  15. mongo --port 55000 add-shards.js
  16.  
  17. read -p "Press enter when ready to execute test.. "
  18. mongo --port 55000 test.js
Add Comment
Please, Sign In to add comment