Mac users:

  1. Install HomeBrew. $ /usr/bin/ruby -e “$(curl -fsSL”
  2. Install MongoDB. $brew install mongodb
  3. $sudo mkdir -p /data/db
  4. Become owner of the db directory. Get your name from $whoami and execute $sudo chown yourname /data/db
  5. Start server using $mongod. If you see any error, stop already running server using $brew services stop mongodb
  6. Open new Terminal and start mongo shell using $mongo.