How To Install MongoDB on Ubuntu 20.04
MongoDB is an open source document database. It is a NoSQL database.
This means that it is non-tabular and stores data differently than relational tables.
NoSQL databases do not require Object Relational Mapping and data normalization.
In this tutorial I will show you how to install MongoDB, a NoSQL database on your Ubuntu 20.04 system.
We need to download the repository key, we will use curl for this. If you don’t have curl installed, type the following in the terminal:
Once you have installed curl, proceed with downloading the key with the command below it.
sudo apt update && sudo apt install curlcurl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
Once we have downloaded the key we add it to the repository list using the following command:
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
Now MongoDB has been added to our repository list and can be installed into our machine. Type the following in the terminal:
sudo apt update && sudo apt install mongodb-org
We have installed MongoDB on our machine now. In the next tutorials we will discuss how to set up and use MongoDB.
Feel free to leave comments and questions.