Installing MongoDB on a mac

1. Install “HomeBrew”:
2. Go to mongoDB install page and follow the instructions for installing the binaries using homeBrew. I did the following:
brew install mongodb

3. Execute the command below to create the data directory
sudo mkdir -p /data/db

4. Execute the command below to give the folder proper permission.
sudo chown -R $USER /data/db

5. Execute the command below in the same console window:

thanks to the following:

Leave a Reply

Your email address will not be published. Required fields are marked *