How to Install MongoDB on Ubuntu/Linux in Hadoop | Download | Install




What is MongoDB?

MongoDB is one kind of NoSQL database that is popular among many enterprises. It is purely open-source document DB. Mongo stores data using a document which is called BISON. BSON is a data format that is like JSON in javascript making an application and faster.

Why MongoDB?

It is Full index support:  Can just use an index like what you do in RDBMS

Replication & High Availability:  MongoDB supports the replication of data between servers for failover.

Querying: If your knowledge of query language querying is easy for you.

How to Install MongoDB on Ubuntu:

Step 1: Download tarball from the Mongo DB website. Here select which version of your Ubuntu and download the tarball 




Step 2: Extract tarball using below command:

tar -xzvf  your tarball full name

Step 3: After that  update the MONGODB_HOME & PATH variables in bashrc file using below command

nano ~/.bashrc

Step 4:  To check the bashrc changes, open a new terminal, and type ‘echo $MONGODB_HOME‘ command.

After will check the exact version of Mongo DB

After installation and configuration of MongoDB will start services

Step 5: Before starting the MongoDB service for the first time, we need to create the data  directory:

 

Step 6: To start the MongoDB service use the  below command

mongod

Congratulations! MongoDB successfully installations on Ubuntu operating system. After completion of start services and open mongo shell to write and read queries in your shell. In Non-relation ship databases didn’t offer that features which means usually it cannot provide full ACID properties. So it will not replace RDBMS in the future because of its weakness in business consistency.




Summary: In this article, we will explain what is MongoDB, why it using in projects, and how to installation MongoDB on Ubuntu operating system with simple steps for beginners/experts. Basically, MongoDB is NoSQL related to services. In case the MongoDB not installed properly then comment it with the exact error, we will try to resolve the issue and reply to it.