Install mongodb community edition in ubuntu 20.04

Ayub Shaik
1 min readNov 24, 2022

--

Installation of community edition of mongodb versions 4/5/6 from mongodb.org official websites.

Level: Easy

I will show the installation steps for mongodb 5.0 community edition.

Similar steps can be followed for versions 4 and 6 from the official website.

The official mongodb installation steps from mongodb are here.

Installation steps:

Update the apt repository.

sudo apt-get update

Add mongodb repository to your sources list in /etc/apt/sources.list.d/ folder

wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list

Update the apt repository again after adding the list file of mongodb from the previous step

sudo apt-get update

Install mongodb 5.0

sudo apt-get install -y mongodb-org

the following packages will be install alongside:

mongodb-org-shell

mongodb-org-server

mongodb-org-database

mongodb-org-mongos

mongodb-org-tools

Note: If you face libssl1.1 package dependency issues while installing, please read this page.

Sources:

Please like and follow for more related issues.

--

--