<slide>
<title>Setting up Replication</title>

<blurb>Open three terminals, and create three directories: %db1%, %db2% and %arb%</blurb>

<blurb>Starting the daemons (2 data, 1 arbiter):</blurb>
<example>
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
</example>

<blurb>Configure the set:</blurb>
<example>
$ 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');
</example>

<blurb>Check whether it worked:</blurb>
<example>
seta:PRIMARY> db.isMaster();
seta:PRIMARY> rs.status();
</example>

</slide>
