Skip to content

Instantly share code, notes, and snippets.

@dam1
Created June 23, 2016 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dam1/b307520f190157c4ee46499d756daf29 to your computer and use it in GitHub Desktop.
Save dam1/b307520f190157c4ee46499d756daf29 to your computer and use it in GitHub Desktop.
mongo replica set
mongod --port 27017 --dbpath /data/db --replSet rs0 --smallfiles --oplogSize 128
mongod --port 27018 --dbpath /data/db2 --replSet rs0 --smallfiles --oplogSize 128
rs.initiate({_id:"rs0", members: [{"_id":1, "host":"127.0.0.1:27017"}]})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment