Skip to content

Instantly share code, notes, and snippets.

@naryad
naryad / local-replica-set-with-oplog.md
Created May 3, 2020 12:24 — forked from richsilv/local-replica-set-with-oplog.md
Setting up a local MongoDB replica set with oplog for use with Meteor

From an appropriate location:

mkdir replica-set
mkdir -p replica-set/rs0-0 replica-set/rs0-1
mongod --port 27018 --dbpath replica-set/rs0-0 --replSet rs0 --smallfiles --oplogSize 128 &
mongod --port 27019 --dbpath replica-set/rs0-1 --replSet rs0 --smallfiles --oplogSize 128 &
mongo localhost:27018