Install Mongo DB on MAC OS X
A short tutorial to install Mongo DB on the Mac OS X using Homebrew.
First, you need to install Homebrew if it’s not already installed on your Mac. Homebrew is a package manager, like NPM, but for the Mac OS. You need it to install Mongo DB on this tutorial. In my opinion, this is the shortest and easiest way to install Mongo DB on the Mac.
If you need more explanation, go to the Homebrew official site.
OK, let’s start.
Tip this command in the Terminal :
$ /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Next, you are able to install Mongo DB.
$ brew install mongodb
The Mongo DB core is installed.
This command run a Mongo DB server instance. If this command not working, you need to retry the installation.
Finally, You need to create database folder, the default database folder is /data/db but Homebrew don’t create it for you. You need to create it manually.
$ sudo cd / && mkdir /data/db
Thank you for reading.