Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Google+ Youtube

Github Stackoverflow Pinterest

Database


Overview

This is a tutorial on how to install MongoDB on a Mac.

Install MongoDB using Homebrew

  1. Install Mongodb, on a Mac (not the latest dev release):

    brew update
    brew install mongodb

    The response (takes a long time):

    ==> Downloading https://homebrew.bintray.com/bottles/mongodb-3.2.8.el_capitan.bo
    ==> Pouring mongodb-3.2.8.el_capitan.bottle.tar.gz
    ==> Caveats
    To have launchd start mongodb now and restart at login:
      brew services start mongodb
    Or, if you don't want/need a background service you can just run:
      mongod --config /usr/local/etc/mongod.conf
    ==> Summary
    🍺  /usr/local/Cellar/mongodb/3.2.8: 17 files, 264.1M
    

    Start MongoDB service

    brew services start mongodb

    The response:

    ==> Successfully started `mongodb` (label: homebrew.mxcl.mongodb)
    

    Re-Start MongoDB service

    brew services restart mongodb