Install MongoDB 2.2.2 in Mac OS X 10.8.2

Source: Internet
Author: User
Tags install mongodb mongodb download mongodb server mongodb version

1. download the latest MongoDB version 2.2.2 from the official website. Click the mongodb download link, or open the terminal and enter a command such

2. After the download is complete, find the directory where the downloaded file is stored and decompress the downloaded file, for example:

After this command is executed, a folder named mongodb-osx-x86_64-2.2.2 is created under the same level directory

3. Because the installation package is stored in a temporary directory, it is best to create a new directory to store mongodb,

Sudo mkdir-p nosql/mongodb

Then, transfer the decompressed mongodb directory to the newly created directory, for example:

4. Use commands

Mkdir-p/data/db

Create the data/db directory under "/", which is the directory for storing mongoDB data.

Set/data/db Directory Permissions

Sudo chown-R your system login username/data

5. Go to the "bin" Directory of mongodb and run the "./mongod" command to start the mongoDB server. After the mongodb server is started successfully, the following message is displayed:

6. Open another terminal window, enter the "bin" directory, and run the command ". /mongo ", you can see that the mongoDB Console appears on the terminal, then you can use any MongoDB command to operate MongoDB data.

For example:

After the configuration is complete, enter the MongoDB world.

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.