# 1. Tap mongodb with brew
brew tap mongodb/brew
# 2. Update brew
brew update
# 3. Install mongodb community version
brew install [email protected]
# 4. Run mongodb in the background
brew services start [email protected]
# 5. Verify mongodb is running in background
brew services list