Install MongoDB under Mac OS

Source: Internet
Author: User
Tags install mongodb

Mac install MongoDB One is through homebrew, the other is the direct official website download package settings, here we say is the latter.

The main steps are: Download unzip, create folder, set permissions

1, download from the official website, the latest version is mongodb-osx-x86_64-3.0.5, unzip the file to a directory you want to place.

It's assumed to be placed under/USERS/XXX/MONGODB.

2. Create a new Data folder under/users/xxx/mongodb, create a new DB folder under Data 3, set permissions, and enter sudo chown-r/users/xxx/mongodb/mongodb-osx-x86_64-3.0.5/ Data 4, enter the/users/xxx/mongodb/mongodb-osx-x86_64-3.0.5/bin directory, set the DB folder path command, enter and return, Mongod--dbpath/users/skythinking/ MONGODB/MONGODB-OSX-X86_64-3.0.5/DATA/DB5. You should see waiting for connections on port 270176. Browser View localhost:27017, see it Looks like you is trying to access MongoDB over HTTP on the native driver port description is connected. environment variable settings: Enter sudo nano ~/.bash_profile enter login password

Export lo_home=/usr/local

Export Xye_home=/users/xy

Export Path=${path}:${lo_home}/mysql/bin

Export Path=${path}:${lo_home}/bin

Export Path=${path}:${xye_home}/mongodb/mongodb-osx-x86_64-3.0.5/bin

Input is shown for example above.

Control+o Save

Control+x exit

SOURCE ~/.bash_profile re-entry echo $PATH view environment variables

Install MongoDB under Mac OS

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.