MAC下MongoDB学习笔记

@bingoogolapple 2015-03-15 02:06:29发表于 bingoogolapple/bingoogolapple.github.io PHP开发环境

brew install mongodb

==> Downloading https://homebrew.bintray.com/bottles/mongodb-3.0.0.yosemite.bott

################################################################## 100.0%

==> Pouring mongodb-3.0.0.yosemite.bottle.1.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/3.0.0: 17 files, 152M

启动方法

mongod --fork

RockMongo

RockMongo是MongoDB很好用的一个web应用,安装也很容易

1.去官网下载最新版本
2.解压到~/Sites/rockmongo下
3.运行http://localhost/rockmongo即可