Install Mongo DB

Install Mongo DB

In order to install Mongo DB you should create a bash script and run following lines:

sudo apt-key adv --keyserver --recv 7F0CEB10
sudo echo "deb dist 10gen" | tee -a /etc/apt/sources.list.d/10gen.list
sudo apt-get -y update
sudo apt-get -y install mongodb-10gen


sudo service mongodb start

Should start the service. If you encounter the error, you can check out the log at

vim /var/log/mongodb/mongod.log

If the issue that you are facing is ‘not enough space’ or

'ERROR: Insufficient free space for journal files2014-05-07T12:55:54.789+0200 [initandlisten] Please make at least 3379MB       available in /var/lib/mongodb/journal or use --smallfiles' 

you can add following line in mongodb config file /etc/mongod.conf or /etc/mongodb.conf.


When you restart the service everything should be in order. You will have Mongo DB installed on your machine.