Install MongoDB

wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
 
cat > /tmp/mongodb.list << EOF
deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse
EOF
 
sudo mv /tmp/mongodb.list /etc/apt/sources.list.d/
 
sudo apt update
 
sudo apt install -y mongodb-org
 
sudo systemctl start mongod
sudo systemctl enable mongod


Last Updated: April 15, 2020