Skip to main content

Mongodb Installation on Ububtu

MongoDB Installation in Ubuntu
=====================================================================

Steps to Install

Step1: First we need to download the mongoDB tar ball 

from this link

Extract the tar ball

hduser@ubuntu:~$ tar -xvf mongodb-linux-x86_64-2.6.6.tgz





Step2:Create a directory named mongodb

hduser@ubuntu:~$ sudo mkdir /usr/lib/mongodb

Step3:Move the extracted package to /usr/lib/mongodb/

hduser@ubuntu:~$ sudo mv mongodb-linux-x86_64-2.6.6 /usr/lib/mongodb/

Step4:Create a directory data directory

hduser@ubuntu:~$ sudo mkdir -p /data/db

Step5:Give proper permissions

hduser@ubuntu:~$ sudo chmod 777 /data/*

Step6:Go inside

hduser@ubuntu:~$ cd /usr/lib/mongodb/mongodb-linux-x86_64-2.6.6/bin$

Step7:Start mongodb server

hduser@ubuntu:/usr/lib/mongodb/mongodb-linux-x86_64-2.6.6/bin$ ./mongod


  
Step8:Start mongodb client from another terminal

hduser@ubuntu:/usr/lib/mongodb/mongodb-linux-x86_64-2.6.6/bin$ ./mongo



If everything goes fine you should see the screen like above.

Mongodb is successfully installed on you machine.

In the next post i will post some examples on Mongodb

Comments

Post a Comment