I create a replica set on my local system in a Windows environment with the next step
mkdir -p \srv\mongodb\rs0-0 \srv\mongodb\rs0-1 \srv\mongodb\rs0-2
mongod --port 27017 --dbpath \srv\mongodb\rs0-0 --replSet rs0 --smallfiles --oplogSize 128
mongod --port 27018 --dbpath \srv\mongodb\rs0-1 --replSet rs0 --smallfiles --oplogSize 128
mongod --port 27019 --dbpath \srv\mongodb\rs0-2 --replSet rs0 --smallfiles --oplogSize 128
and then
mongo shell type mongo --port 27017
rs.initiate()
but i get getttin message
"{ "ok" : 0, "errmsg" : "server is not running with --replSet" }"
early
source
share