慕运维2858188
2017-08-29 19:29:01浏览 3766
安装
brew install mongodb
安装提示
Downloading https://homebrew.bintray.com/bottles/mongodb-3.0.6.yosemite.bottle.tar.gz Already downloaded:
/Library/Caches/Homebrew/mongodb-3.0.6.yosemite.bottle.tar.gz ==> Pouring mongodb-3.0.6.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 don't
want/need launchctl, you can just run: mongod --config
/usr/local/etc/mongod.conf ==> Summary
/usr/local/Cellar/mongodb/3.0.6: 17 files, 159M
启动MongoDB
mongod --config /usr/local/etc/mongod.conf
配置相关
**systemLog://log 目录
destination: file
path: /usr/local/var/log/mongodb/mongo.log logAppend: true
storage://db目录
dbPath: /usr/local/var/mongodb net://网络地址 bindIp: 127.0.0.1
使用MongoDB
mongo