[LIN] Install MongoDB - official docs
Run the following commands in your terminal:
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
# FOR VERSION 16.O4 ONLY
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
# FOR VERSION 18.O4 ONLY
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
# NEXT STEPS FOR ALL VERSIONS
sudo apt-get update #to reload local package database
sudo apt-get install -y mongodb-org #to install the MongoDB packages
To start MongoDB on your machine:
$ sudo service mongod start
Install MongoDB Compass - official docs
- Visit the Download and Install Compass page.
- Select DEBIAN for Ubuntu OS.
- Follow the instructions to install the MongoDB Compass app.
You must download the normal version, not the Community Edition.