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