title: Running mongod in the background in Linux
body: <p>I would like to run mongodb on <code>vagrant</code>,I have used the following command:</p>
  
  <pre><code> sudo mongod --fork --logpath /var/log/mongodb.log --dbpath ./data
  </code></pre>
  
  <p>I have also tried modifying the above statement with all(cumulatively) and each of these options:</p>
  
  <pre><code>--logappend
  --journal
  --port 27017 and --port 27018
  </code></pre>
  
  <p>I get this error(with request to add journaling for durability and a notification that mongod will copy log to temporary file if journaling or logappend are disabled):</p>
  
  <pre><code>forked process: 5360
  all output going to: /var/log/mongodb.log
  ERROR: child process failed, exited with error number 100
  </code></pre>
  
  <p>I already have <code>mongodb</code> installed on my pc and it uses <code>27017</code> as the <code>port</code>,will this conflict with the error in running <code>mongod</code> </p>