How To Install MongoDB on Ubuntu 20.04

friday Emmanuel chigozirim
LearnFactory Nigeria
4 min readJul 11, 2022
https://www.google.com/search?client=ubuntu&hs=omP&channel=fs&sxsrf=ALeKk00LjMQf-oO-m4ijkYwxXX0b01i-8Q:1602682615197&q=mongodb+icon+png&tbm=isch&chips=q:mongodb+icon+png,online_chips:icon+fonts&usg=AI4_-kSTZJ_g7g9rLIp42mxUFmVuXZpuyQ&sa=X&ved=2ahUKEwj6kd3_mbTsAhWT5OAKHYLyCvMQgIoDKAF6BAgKEAo&biw=1280&bih=633

Hello Guys welcome back again to my channel i will be showing you steps on how to install MongoDB on Ubuntu 20.04 and it is also applicable on other version. but before we get started i will like to set up the ground for you, have you asked your self these questions.

  1. Why are you installing MongoDB?
  2. Which platforms can i use it
    Having asked these questions let get started.

First before we start i will defined MongoDB and some things you need to know.

Definition/Introduction:
MongoDB is one of the most popular open-source NoSQL database written in C++. As of February 2015, MongoDB is the fourth most popular database management system. It was developed by a company 10gen which is now known as MongoDB Inc. further More, MongoDB is also known as Mongo, is an open-source document database used in many modern web applications. It is classified as a NoSQL database because it does not rely on a traditional table-based relational database structure. This Platforms Does not make use of traditional table-base, but JSON-like document with dynamic schemas, this means that MongoDB does not require a predefined schema before you add data to a database.

Why Do I Need MongoDB?
Companies and development teams of all sizes use MongoDB because: The document data model is a powerful way to store and retrieve data that allows developers to move fast. MongoDB’s horizontal, scale-out architecture can support huge volumes of both data and traffic.

Who and Who are using MongoDB?

1. Castlight Health.

2. IBM.

3. Citrix.

4. Twitter.

5. T-Mobile.

6. Zendesk.

7. Sony.

8. BrightRoll.

9. Foursquare.

10. HTC.

11. InVision.

12. Intercom etc.

Structure Of MongoDB:

Where Should i use MongoDB?
1. E-Commerce type of product-based applications
2. Blog and Content Management systems
3. High Speed logging, caching etc in the Real time
4. Need to maintain location wise Geospatial data
5. For maintains data related to the Social and Networking types
6. If application is a loosely coupled mechanism — means design may change at any point of time.

Which Platform and language Accepts MongoDB?
Alright there are a whole lot that uses MongoDB as there Database management system i will list out only but a few. They are as follows: C, C++, C# and .NET, Java, Node.JS, Perl, PHP, PHP Libraries, Frameworks, and Tools, Python, Ruby, Mongoid (Ruby ODM).

lastly lets look at the Comparison Between SqlDB Schema And MongoDB Schema. below is the comparison, haven known these, i believe you know better what you are about to go into. At this point let get start with our installation.

For the Installation processes to start there are few things you need to download and set up, which is th MongoDB Compass. there are ways you can use to download it.
from your Ubutun Software,
from your terminal. because of some things at hand i will use the terminal for the installation, but first you have to download it from this website below. https://www.mongodb.com/try/download/compass?tck=docs_compass.
note the following few things
If you are using mac OS select you type of OS and if windows select that too for Ubutun select Ubutun, i will be showing you the different views for each OS.

https://www.mongodb.com/try/download/compass?tck=docs_compass
windows OS

having down this wait for the downing to finish, after that open your terminal with Ctrl+Alt+T

you have this than cd into the file directory you downloaded your MongoDB compass.

sudo dpkg -i mongodb-compass_1.22.1_amd64.deb

wait for it to install after that you can now proced to install the mongoDB

After you must have finished installing the MongoDB Compass from the terminal exit it and then open another terminal to run the following lines of code.

your Output will show ok

to check if the key was added successfully enter the following command

your output will look like this

to create a file in the source.list.d enter the following command

fter running this command, update your server’s local package index so APT knows where to find the mongodb-org package:

to install MongoDB follow the process below

you wait for it to finish. the next thing is to set up Starting the MongoDB Service and Testing the Database

at this point we have gotten to the finial stage, you just have to run your MongoDB compass, and that’s all for the installation process. thanks for staying with us.

this is basically how the MongoDB Compass Envirment looks like

--

--