mac 安装mongodb
2016年3月13日
brew install mongodb 安装mongodbln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents 这个一定要执行launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist 开机启动
启动|停止
1 | launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist |
设置快捷命令
1 | vim ~/.bash_aliases |
然后
1 | vim ~/.bash_profile |
就可以用mongo.start mongo.stop mongo.restart 来进行开启,关闭,重启 mongodb的服务了
