install mongodb mac stack overflow

Shell
~> brew tap mongodb/brew
~> brew install mongodb-community
Source

Also in Shell: