This article demonstrates the MongoDB installation procedure in utterly simple steps. MongoDB is assumed to be the replacement of traditional relational databases. It is one of the leading Open Source NoSQL document-oriented database.
Overview
MongoDB is developed in C++ language and is designed to work with large web applications. It is unlike other databases and introduces Collections as alternate to tables and Document as a set of key-value pairs which is equivalent to tuples in standard databases.
Pre-requisites
- You must have a Ubuntu 14.04 LTS server installation.
- You should either be a root user or can be a non-root user but with sudo access privileges.
MongoDB Installation Steps
Coming back to the objective of this article is to assist you in setting up MongoDB on your Ubuntu 14.04 server hosted in a production application environment. Let’s now look into the step-by-step instructions.

First import the MongoDB public key used by the package management system:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
Then create a list file for MongoDB:
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
Now reload the package database:
sudo apt-get update

At this point, installing MongoDB is as simple as running just one command:
sudo apt-get install -y mongodb-org

Start-Up MongoDB
sudo service mongod start
Check MongoDB Service Status:
sudo service mongod status
Shutdown MongoDB
sudo service mongod stop
Restart MongoDB
sudo service mongod restart
To Check Mongodb installed version
$mongo db
MongoDB shell version: 2.6.10
So this was all about the MongoDB installation process on Ubuntu 14.04 server. In my next article, I’ll be talking about “How to setup MongoDB for use and will cover creation of Collections and Documents“. See you till then, Enjoy reading!!!
The post How to Install MongoDB on Ubuntu 14.04 appeared first on TechBeamers.