官网下载
本地解压
下载完成后,是一个 .tgz 文件:mongodb-macos-x86_64-6.0.1.tgz
解压后的目录结构如下,
├── LICENSE-Community.txt
├── MPL-2
├── README
├── THIRD-PARTY-NOTICES
└── bin
├── install_compass
├── mongod
└── mongos
启动 MongoDB
# 确保目录存在
$ mkdir /Users/thzt/mongodb && mkdir /Users/thzt/mongodb/db
# 启动
$ ./mongod --dbpath /Users/thzt/mongodb/db
启动后可以在 浏览器中访问
http://localhost:27017/
> It looks like you are trying to access MongoDB over HTTP on the native driver port.
使用 Navicat Premium 连接



网友评论