Hello Everyone, In this article, we will learn about how to install MongoDB on Ubuntu 14.04 version. As of now, Ubuntu comes with version 18 also but still there are so many users are using Ubuntu 14.04 as well as Ubuntu 16.04.

Before jump to the installation process, let’s get a simple introduction about MongoDB and Ubuntu.

Introduction to MongoDB

MongoDB is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schema.

As of now, MongoDB is using by so many organizations as well as using in top 500 fortune companies also.

If you want to know more about MongoDB, then you can visit MongoDB official Website.

Introduction to Ubuntu

Ubuntu is a free and open source operating system and Linux distribution based on Debian. Ubuntu is offered in three official editions: Ubuntu Desktop for personal computers, Ubuntu Server for servers. 

I personally love Ubuntu because Ubuntu comes with so very easy to use and effective interface and easy to learn too.  As mentioned above, currently Ubuntu comes with version 18.04 as well as Ubuntu is using by so many organisation who worked in IoT, Servers etc.

If you want to know more about Ubuntu, then you can visit Ubuntu Official Website.

Now time came to know about steps as how to install MongoDB on Ubuntu 14.04 version.

Install MongoDB on Ubuntu 14.04 Version

Pre-requisites:-

  1. Ubuntu 14.04 version should be installed as OS  either as your system OS or in virtual machine. 
  2. sudo non-root user access to make sure, User can able to perform steps.

Steps for Install MongoDB on Ubuntu 14.04 Version

Step 1 : Importing the Public Key

First we will import MongoDB GPG public key. The official MongoDB repository provides key to make ensure the authenticity of software packages by verifying that they are signed with GPG keys

 

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

 

Step 2 : Add MongoDB Repository details in Ubuntu Repo file.

Once we will import public key successfully, then we need to add mongoDB repository details into Ubuntu repo file. For Adding just run below command.

 

$ echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

 

This command will add MongoDB repo information to Ubuntu repo file. 

Step 3 : Update Ubuntu packages

When ever we will add or make any changes into Ubuntu repo list, we need to update it. For update run below command. 

 

$ sudo apt-get update

 

Step 4 : Install MongoDB 

Update process usually takes some time, but once Step 3 complete successfully, you are ready to install MongoDB. For installing , please run below command. 

 

$ sudo apt-get install -y mongodb-org

 

Installation process is depending on your internet connection also, because it will first download then will install. 

Step 5 : Check MongoDB service

Once MongoDB installation will be done, Mongod service will start automatically. You can check status by below command.

 

$ service mongod status

 

Congratulation, You installed MongoDB into Ubuntu 14.04 version successfully. 

Step 6 : Stop / Start MongoDB Service 

This is an optional step, which you can try later based on your requirement. If you want to Stop mongoDB, then simply run below command.

 

$ service mongod stop

 

If you want to Start mongoDB, then simply run below command.

$ sudo service mongod start 

Conclusion

I hope, you  learn about how to install MongoDB on Ubuntu version 14.04. In case of any confusion, you can comment down and I will try my best to reply as soon as possible.

For other tutorials, related to MongoDB and other big data technology, please visit my website 

Share.

About Author