MongoDB安裝好的一些貼心小提示

記錄一下,免得忘了找不到...

# brew install mongodb
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
######################################################################## 100.0%==> Caveats
If this is your first install, automatically load on login with:
    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/Cellar/mongodb/2.0.5-x86_64/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

If this is an upgrade and you already have the homebrew.mxcl.mongodb.plist loaded:
    launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
    cp /usr/local/Cellar/mongodb/2.0.5-x86_64/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

Or start it manually:
    mongod run --config /usr/local/etc/mongod.conf

The launchctl plist above expects the config file to be at /usr/local/etc/mongod.conf.
==> Summary
/usr/local/Cellar/mongodb/2.0.5-x86_64: 17 files, 121M, built in 4.4 minutes

上面藍色字的部份,是讓使用者把mongodb加到開機自動啟動的方式
而紅色的部份則是把mongod以standalone方式啟動的方法