Mac under the MongoDB installation there are two main ways, one is manual installation, need to download the source files on the official website, the second is through homebrew, as for homebrew do not introduce. Since it is a Mac system, I think it is best to install it directly through homebrew, and it is simple and convenient.
1,Brew Updata (if the MAC is already installed homebrew)
2. Brew Install MongoDB
Refer to the 1 official website also has two kinds of installation methods, self-reference.
3. # Create/data/db directory, default create Data/db folder in system root directory
sudo mkdir-p/data/db
# Set/DATA/DB directory permissions
sudo chown-r your system login user name/data
sudo chown-r chet/data
Reference 1 also provides a custom data folder location to the method, you can view it yourself.
4,mongod--config/usr/local/etc/mongod.conf (This command is the second step after the installation of the prompt to travel), if there is no error indicating that the start of success,
5, after successfully starting MongoDB, then open a command line window input MONGO, do not after the successful start of the interface to operate. This allows you to perform some operations on the database. For example, I entered the help command, which prompts a series of helpful instructions in the Command Line window.
There are also a lot of mongodb visual management tools, here is a list of http://docs.mongodb.org/ecosystem/tools/administration-interfaces/, I chose Robomongo , you can connect by default, or you can set a user name and password to authenticate logins.
At this point MongoDB is successfully installed on Mac and can be used with Nodejs.
Reference documents:
1. Install MongoDB on OS X (http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/)
MongoDB installation under Mac