Skip to content

Instantly share code, notes, and snippets.

@regisdiogo
Last active October 20, 2016 11:01
Show Gist options
  • Save regisdiogo/a66899517a43be158a4481621d19e9a6 to your computer and use it in GitHub Desktop.
Save regisdiogo/a66899517a43be158a4481621d19e9a6 to your computer and use it in GitHub Desktop.
Bash on Ubuntu on Windows - Install MongoDB Community Edition

Import the public key used by the package management system.

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927

Create the /etc/apt/sources.list.d/mongodb-org-3.2.list file

echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

Reload local package database.

$ sudo apt-get update

Instal MongoDB latest release

$ sudo apt-get install -y mongodb-org

Create data folder

$ sudo mkdir /data/db/ -p

Start MongoDB server

$ sudo mongod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment