How to : Installing Mongodb on Linux

Mongodb is a open source database which is document oriented and is a part of Nosql database family . Its structure is a similar to JSON style documents with dynamic schemas. Mongo is used by eBay, MetLife, Telefónica, Foursquare, MTV Networks and the UK Government. MongoDB is the most popular NoSQL database management system.

Mongodb’s software packages are available for Windows, Linux, OS X, and Solaris.

Mongodb installation on Ubuntu :

1. Import GPG Key from i10gen for Mongodb

#sudo apt-key adv –keyserver hkp:// –recv 7F0CEB10

2. Issue command to configure repository

echo ‘deb dist 10gen’ | sudo tee /etc/apt/sources.list.d/10gen.list

3. Update apt repository

#sudo apt-get update

4. Install the latest version of Mongo

#sudo apt-get install mongodb-10gen

Mongodb installation on Redhat/CentOS/Fedora :

1. Create yum repository file to configure Mongodb repository

# vi /etc/yum.repos.d/mongo.repo

Insert the below contents and save the file

For 64 bit systems


name=10gen Repository




For 32 bit systems

name=10gen Repository

2. Install packages

#yum install mongo-10gen mongo-10gen-server


Starting Mongo Daemon

1. Start the Mongod service

# /etc/init.d/mongod start

Start Playing with Mongodb

Login to shell

# mongo

We will come up with more step by step tutorial related to Mongodb , till then refer i10gen website’s tutorial pdf

27 Responses

  1. Dirk says:

    Nice tut. , Mongo is the champion

  2. raj kumar agarwal says:

    Good article , took only 10 minutes to install mongo

  3. Mandeep says:

    too good to be true….nice one

  4. doink says:

    thanks helped me in doing quick installation , 10gen article is also nice but too lengthy