MAC Brew Installation MongoDB

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



Brew Introduction



Brew, also known as homebrew, is the software package management tool on Mac OSX, it can easily install software or uninstall software in Mac, it is very convenient to use only one command.



Brew similar to the Apt-get functions of Ubuntu system



Installing Brew



Brew's official website: http://brew.sh/A detailed description of the use of Brew on the official website



Installation method: Open termal: Enter command in Mac:


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


Using Brew to install software



A command is done, like installing Git.


Brew Install Git


such as installing wget


Brew Install wget


Uninstalling Software with Brew



Uninstall is more convenient.


Brew Uninstall Wget


Using Brew query Software



Sometimes you don't know the name of the software you're installing, then you need to search for the name of the package first.



For example, I want to install


Brew search/wge*/


/wge*/is a regular expression that needs to be included in the/



Other Brew commands



Brew List lists installed software



Brew Update Update Brew



Brew Home opens Brew's official website with a browser



Brew Info Displays software information



Brew Deps Show Package dependencies



Using Brew to install MongoDB


Brew Install MongoDB


Installation Prompt Code


jokerbj-MacBook-Pro: ~ jokerbj $ brew install mongodb
==> Downloading https://homebrew.bintray.com/bottles/mongodb-3.2.3.yosemite.bott
Already downloaded: /Library/Caches/Homebrew/mongodb-3.2.3.yosemite.bottle.tar.gz
==> Pouring mongodb-3.2.3.yosemite.bottle.tar.gz
==> Caveats
To have launchd start mongodb at login:
   ln -sfv /usr/local/opt/mongodb/*.plist ~ / Library / LaunchAgents
Then to load mongodb now:
   launchctl load ~ / Library / LaunchAgents / homebrew.mxcl.mongodb.plist
Or, if you do n‘t want / need launchctl, you can just run:
   mongod --config /usr/local/etc/mongod.conf # start command


Configuration file


jokerbjdeMacBook-Pro: local jokerbj $ cat /usr/local/etc/mongod.conf

systemLog:

   destination: file

   path: /usr/local/var/log/mongodb/mongo.log # log storage

   logAppend: true

storage:

   dbPath: / usr / local / var / mongodb # data storage

net:

   bindIp: 127.0.0.1 


Start:


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


Enter the database:


$ MONGO


If you want to uninstall


Brew Uninstall MongoDB


MAC Brew Installation MongoDB


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.