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 mongodb@3.4
启动MongoDB服务:
brew services start mongodb@3.4
关闭MongoDB服务:
brew services stop mongodb@3.4
进入MongoDB图形化界面:
mongo
查看homebrew安装的服务情况:
brew services list
个人公众号谢谢各位老铁支持