MongoDB4.0在Windows环境的下载、安装、配置
2018-07-26 本文已影响332人
J先生有点儿屁
MongoDB4.0在Windows环境的下载、安装、配置
今天本想玩玩MongoDB,可因工作机上未下载Linux虚拟机,下载多耗时。无奈只能先下载Windows版本耍耍。
不料,Windows在安装时也有不顺。
一、下载
地址官网:https://docs.mongodb.com/
如图。 话说MongoDB windows的安装包名称也有意思:mongodb-win32-x86_64-2008plus-ssl-4.0.0-signed.msi 。 咋一看还以为是WinServer2008专用。

二、安装
安装时需要注意图形化界面的安装选择,非常非常耗时。。。
详细安装步骤比较简单,见图即可。


下一步需要注意选择Custom


本次安装目录是:
D:\Program Files\MongoDB\Server\4.0\

这一步不要勾选“Install MongoDB Compass” ,这个选择后会去下载和Compass,很花费时间的!

如果需要MongoDB Compass,可以直接到官网下载,另外安装。



三、测试
-
1.打开cmd,到安装目录\bin下执行mongo,进入mongo命令模式。
mongo命令
- 测试
> db
test
> show dbs
admin 0.000GB
config 0.000GB
local 0.000GB
>

- 服务状态查看
进入【服务】列表,找到MongoDB Server ,查看状态是否为正在运行。
服务列表
- 服务状态查看
- 访问 Http://localhost:27017
http://localhost:27017
It looks like you are trying to access MongoDB over HTTP on the native driver port.
出现这个代表服务正常使用。默认端口:27017
- 访问 Http://localhost:27017
本问参考了:https://blog.csdn.net/dorma_bin/article/details/80851230
https://blog.csdn.net/shu15121856/article/details/80736092