2018年更新:
更为简单的方法:
通过 homebrew 安装:brew install mongodb
如果报错:
mongodb: A full installation of Xcode.app 8.3.2 is required to compile this software. Installing just the Command Line Tools is not sufficient. Xcode can be installed from the App Store. Error: An unsatisfied requirement failed this build.
说明Xcode版本过低,需要更新,如果你不想更新,可以通过使用命令:
homebrew search mongodb
查看更低版本的MongoDB,然后安装更低版本的MongoDB。
brew install [email protected]
启动MongoDB服务:
brew services start [email protected]
关闭MongoDB服务:
brew services stop [email protected]
进入MongoDB图形化界面:
mongo
查看homebrew安装的服务情况:
brew services list