mongodb

2018-02-02  本文已影响0人  一位有礼貌的先生

mac

brew install mongodb 
$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist 
$ mongod -f /usr/local/etc/mongod.conf 
dbpath =  /usr/local/mongodb/data/
logpath = /usr/local/mongodb/log/mongodb.log
fork = true 
$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist 
brew services start mongodb 
brew services stop mongodb 
/usr/local/etc/mongod.conf

*日志的位置

/usr/local/var/log/mongodb/mongo.log
/usr/local/var/mongodb/

windows

上一篇下一篇

猜你喜欢

热点阅读