Skip to content

Instantly share code, notes, and snippets.

@iamakimmer
Created February 28, 2013 04:08
Show Gist options
  • Save iamakimmer/5054092 to your computer and use it in GitHub Desktop.
Save iamakimmer/5054092 to your computer and use it in GitHub Desktop.
Create a replica set in mongodb
mongod --replSet rs1 --logpath "1.log" --dbpath /data/rs1 --port 27017 --fork
mongod --replSet rs2 --logpath "2.log" --dbpath /data/rs1 --port 27018 --fork
mongod --replSet rs3 --logpath "3.log" --dbpath /data/rs1 --port 27019 --fork
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment