I’ll introduce the steps to install MongoDB on Mac using Homebrew. (Last updated: 2014/12/01)
% brew install mongodb
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/mongodb-2.6.5.yosemite.bottle.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/mongodb-2.6.5.yosemite.bottle.2.tar.gz
==> Pouring mongodb-2.6.5.yosemite.bottle.2.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 don't want/need launchctl, you can just run:
mongod --config /usr/local/etc/mongod.conf
==> Summary
/usr/local/Cellar/mongodb/2.6.5: 17 files, 331M
% mongod
You just need to create a symbolic link to the plist file.
ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
Let’s verify that you can log in from the CLI.
% mongo
MongoDB shell version: 2.6.5
connecting to: test
>
That’s all from the Gemba.