How to install MongoDB on Ubuntu 18.04

MongoDB is a document-oriented database program.

wget -qO - | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] bionic/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org

Start MongoDB

sudo systemctl start mongod

Check if everything worked

sudo systemctl status mongod

Leave a Reply

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