Open three terminals, and create three directories: db1, db2 and arb

Starting the daemons (2 data, 1 arbiter):


mongod --dbpath=./db1 --port 13000 --replSet seta --smallfiles --logpath=db1.log
mongod --dbpath=./db2 --port 13001 --replSet seta --smallfiles --logpath=db2.log
mongod --dbpath=./arb --port 13002 --replSet seta --smallfiles --logpath=arb.log
Configure the set:


$ mongo localhost:13000

> rs.initiate( { _id: 'seta', members: [ { _id: 0, host: 'localhost:13000' } ] } );
seta:PRIMARY> rs.add('localhost:13001');
seta:PRIMARY> rs.addArb('localhost:13002');
Check whether it worked:


seta:PRIMARY> db.isMaster();
seta:PRIMARY> rs.status();