最近正好有朋友问怎么安装Mongodb,用之前的老办法操作一波,却被坑了。
因为之前都是用brew安装的,但是不凑巧的是19年9月份mongodb从Homebrew删除了。 437700
To our users: if you came here because mongodb stopped working for you, we have removed it from the Homebrew core formulas since it was migrated to a non open-source license. Upstream maintains their custom Homebrew tap for it at github.com/mongodb/hom…, which due the modular nature of Homebrew is very easy to use. We will no longer provide support for mongodb.
安装步骤
安装Homebrew
官网 先去Homebrew官网安装好
用Homebrew安装Mongodb
brew tap mongodb/brew
brew install mongodb-community
以后就可以用
brew services start mongodb-community 这条命令启动mongodb数据库了
默认的端口是: 27017
默认的仓库地址是:/usr/local/var/mongodb
默认配置文件在:/usr/loacl/etc/ 的mongod.conf配置文件
默认的安装路径是:/usr/local/Cellar/mongodb-community
运行Mongodb客户端
命令行中输入:mongo即可
当然也可以用可视化工具类似Navicat Premium