MongoDB installation under Mac

Source: Internet
Author: User
Tags brew install mongodb install mongodb

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.