Install MongoDB on macOS (M1)
12 May 2022 (Updated 17 May 2022)
Install brew package
brew tap mongodb/brew
brew update
brew install mongodb-community # This will install latest stable version
Binaries installed
This will install the following binaries:
Location of key files and directories
File / directory type | Location |
Config file | /opt/homebrew/etc/mongod.conf |
Log directory | /opt/homebrew/var/log/mongodb |
Data directory | /opt/homebrew/var/mongodb |
Manage service
Start service:
brew services start mongodb-community
Stop service:
brew services stop mongodb-community
See this post for more information on managing services via Homebrew.
Use MongoDB REPL
mongosh
Sources
Tagged:
Misc
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment