Difficulty: Beginner
Estimated Time: 10 minutes

Run locally MongoDB

Step 1 of 3

Step 1

In this first step, well review the environment and install MongoDB Community.

Look at the system you are one:

lsb_release -a

Then, we'll the follow the official documentation:

  • Import the MongoDB public GPG Key

wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -

  • Create the /etc/apt/sources.list.d/mongodb-org-4.4.list file

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

  • Reload the local package database

sudo apt-get update

  • Install the latest stable version

sudo apt-get install -y mongodb-org

  • Display MongoDB client version

mongo --version

  • Check MongoDB deamon service status

systemctl status mongod

Do "Ctrl + C" to exit this window