Example of using Brew to install MongoDB data on Mac

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

MongoDB installation has a variety of installation methods, there is a direct use of homebrew mode, but also the source code compiled way. The simplest homebrew are used here.

1 using Brew to install MONGODB, you first need to make sure that you have homebrew installed on your computer and enter the following command at the terminal:

Ruby-e "$ (curl-fsskl raw.github.com/mxcl/homebrew/go)"

Install homebrew. (If you have already installed homebrew, you can skip this step)

2 After the brew is installed, update it first:

Brew Update

3 is then installed MongoDB:

Brew Install MongoDB

Wait a few minutes, if the terminal displays the following prompts, indicating that the MongoDB installation was successful.

4 Start MongoDB, enter at command line interface:

Mongod--config/usr/local/etc/mongod.conf

If there is no error, the Mongod service has started successfully

5 Use the MONGO command to connect to the database, open a new command line window, and then enter MONGO:

Mongo


At this point, the MongoDB database installation and connection is successful.

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.