Windows安装
下载地址:https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.6.3-signed.msi
安装教程:
http://www.runoob.com/mongodb/mongodb-window-install.html
https://blog.csdn.net/heshushun/article/details/77776706
可视化工具
https://download.robomongo.org/1.2.1/windows/robo3t-1.2.1-windows-x86_64-3e50a65.exe
PyCharm安装MongoDB插件
https://blog.csdn.net/heshushun/article/details/77777752
Linux/Ubuntu安装
- 下载mongodb的版本,两点注意
- 根据业界规则,偶数为稳定版,如1.6.X,奇数为开发版,如1.7.X
- 32bit的mongodb最大只能存放2G的数据,64bit就没有限制
- 到官网,选择合适的版本下载
- 解压
tar -zxvf mongodb-linux-x86_64-ubuntu1604-3.4.0.tgz
- 移动到/usr/local/目录下
sudo mv -r mongodb-linux-x86_64-ubuntu1604-3.4.0/ /usr/local/mongodb
- 将可执行文件添加到PATH路径中
export PATH=/usr/local/mongodb/bin:$PATH
管理mongo
- 配置文件在/etc/mongod.conf
默认端口27017
启动
sudo service mongod start
- 停止
sudo service mongod stop
- 使用终端连接
- 这个shell就是mongodb的客户端,同时也是一个js的编译器
mongo
- 命令
db查看当前数据库名称
db.stats()查看当前数据库信息
- 终端退出连接
exit
或ctrl+c