How to install MongoDB on Ubuntu 22.04







MongoDB :

MongoDB is an open-source document database.It comes under NoSQL database.
The Data stored in MongoDB is in the form of key value pairs which is BSON (type of JSON).




step 1:

sudo apt-get update


step 2:

sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common


step 3:

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


step 4:

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

step 5:

sudo apt-get update



step 6:

echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list



step 7:

sudo apt-get update



step 8:

sudo apt-get install libssl1.1



step 9:

sudo apt-get install -y mongodb-org



step 10:

systemctl start mongod


step 11:

systemctl enable mongod



step 12:

systemctl status mongod


step 13:

mongo






















No comments

darkmode