OPERATING SYSTEMSOS Linux

How to Install MongoDB 4.2 on Ubuntu 20.04 LTS

How to Install MongoDB 4.2 on Ubuntu 20.04 LTS

sudo apt-get install gnupg
wget -qO – https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add –
echo “deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo systemctl enable mongod
sudo systemctl start mongod
sudo systemctl status mongod
mongo
show dbs
use db
show collections

source

ubuntu 20.04

Leave a Reply

Your email address will not be published. Required fields are marked *