3.MacOS下安装
(1)安装brew
打开终端,执行
/usr/bin/ruby -e "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"
brew官网: https://brew.s
(2)安装MongoDB
brew install mongodb #安装
berw uninstall mongodb #卸载
(3)启动/关闭MongDB
brew services start mongodb #启动 MongoDB服务
brew services stop mongodb #关闭MongoDB服务
brew services restart mongodb #重启MongoDB服务
(4)配置文件
默认配置文件位置: /usr/local/etc/mongod.co
配置文件选项文档 https://docs.mongodb.com/manual/reference/configuration-option