Skip to content

Instantly share code, notes, and snippets.

@turing4ever
Created May 4, 2018 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save turing4ever/28ea2e9a5a7fb0cc672609d32466f131 to your computer and use it in GitHub Desktop.
Save turing4ever/28ea2e9a5a7fb0cc672609d32466f131 to your computer and use it in GitHub Desktop.
How to setup mongodb on Mac
# Install mongodb
brew update
brew install mongodb
mkdir -p /data/db
sudo chown -R `id -un` /data/db
# Get a sample databaes
wget http://media.mongodb.org/zips.json
mongoimport -v --file=zips.json #loads into test.zips
# if you want to specify a database and collection
# mongoimport --db scratch --collection zips --file zips.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment