install mongodb on mac

Shell
brew tap mongodb/brew
#step 1brew install [email protected]
#Step 2brew services start [email protected]
#Step 3 to run as a service//be sure you have GNU's GCC:
brew install gcc
Source

Also in Shell: