Member-only story
Install MongoDB Community Server (local) in MacOS Monterey
The below post is a step-by-step guide to install Mongodb in your MacOS local system. If you are running MacOS Monterey , you would have noticed that you could not install Mongodb via Homebrew, because MongoDB is removed from Homebrew-core.
So the best option would be to download the package from MongoDB community downloads page.
Once you have downloaded the file, use ‘tar -vxf mongodb-macos-x86_64–5.0.8.tgz” to extract the directory or simply open the file , it will automatically extract in the downloaded location.
- Untar the downloaded file.
2. Rename the directory to Mongodb and move it to your desired location.
mv mongodb-macos-x86_64-5.0.8 mongodb
3. Create the data/db directory under /usr/local/var
mkdir -p /usr/local/var/data/db