The replica set is a group of mongod instances that maintain the same data set.
This example shows how to configure a replica set with three instances on the same server.
Creating data folders
mkdir /srv/mongodb/data/rs0-0
mkdir /srv/mongodb/data/rs0-1
mkdir /srv/mongodb/data/rs0-2
Starting ...