Skip to content

Instantly share code, notes, and snippets.

@citmusa
Created May 19, 2017 15:56
Show Gist options
  • Save citmusa/fe65a226e34a1dd7f5201301503c1d37 to your computer and use it in GitHub Desktop.
Save citmusa/fe65a226e34a1dd7f5201301503c1d37 to your computer and use it in GitHub Desktop.
mongodb in mac with homebrew
# install mongo
brew install mongodb
#create the path in which mongo will store databases (it is recommended not to change this path)
sudo mkdir -p /data/db
#give us permissions over data/db:
# get our name
whoami
# get ownership:
sudo chown -R {USERNAME} /data/db # replacing {USERNAME}
# Test everithing went ok
mongod
# the output must end in something like
# NETWORK [thread1] waiting for connections on port 27017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment