Skip to content

Instantly share code, notes, and snippets.

@k0emt
Created May 14, 2013 01:37
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 k0emt/5572991 to your computer and use it in GitHub Desktop.
Save k0emt/5572991 to your computer and use it in GitHub Desktop.
Companion javascript to initialize MongoDB replica set.
config = { _id: "m101", members:[
{ _id : 0, host : "localhost:27017"},
{ _id : 1, host : "localhost:27018"},
{ _id : 2, host : "localhost:27019"} ]
};
rs.initiate(config);
rs.status();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment