macos mongodb install code example Example 1: brew install mongodb brew tap mongodb/brew Example 2: install mongodb on mac brew tap mongodb/brew #step 1