Skip to content

Instantly share code, notes, and snippets.

@lucas-maicoin
Created November 14, 2018 02:43
Show Gist options
  • Save lucas-maicoin/46a8127fccbb47fc2067789669590079 to your computer and use it in GitHub Desktop.
Save lucas-maicoin/46a8127fccbb47fc2067789669590079 to your computer and use it in GitHub Desktop.
mongodb-installation.md
## clean source
sudo rm /etc/apt/sources.list.d/mongodb*.list
## Import the public key used by the package management system.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
## Create a list file for MongoDB
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
## Reload local package database
sudo apt-get update
## Install the MongoDB packages.
sudo apt-get install -y mongodb-org
## Start MongoDB
sudo service mongod start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment