# 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