title: How to edit MongoDB configuration file to include replica set?
body: <p>I have a Linux Mint/Ubuntu machine with a <code>mongodb</code> installed from ubuntu package manager (APT-GET). I try to edit <code>/etc/mongod.conf</code> using </p>
  
  <pre><code>sudo nano /etc/mongod.conf
  </code></pre>
  
  <p>activate the <code>replySet</code> field so that it reads:</p>
  
  <pre><code># Replication Options
  # in replicated mongo databases, specify the replica set name here
  replSet=rs0
  
  # maximum size in megabytes for replication operation log
  #oplogSize=1024
  # path to a key file storing authentication info for connections
  # between replica set members
  #keyFile=/path/to/keyfile
  </code></pre>
  
  <p>succesfully restarted mongod instance with: <code>sudo service mongod restart</code>
  But, whenever I run <code>rs.initiate()</code>, it resulted in error that suggests <code>mongod</code> can't find it's config file</p>
  
  <pre><code>{
    "info2" : "no configuration explicitly specified -- making one",
    "me" : "Leony:27017",
    "ok" : 0,
    "errmsg" : "No host described in new configuration 
    1 for replica set rs0 maps to this node",
    "code" : 93
  }
  </code></pre>
  
  <p>Any suggestion ?</p>