MongoDB及可视化工具的安装

原文出处:https://zhuanlan.zhihu.com/p/29986675

下载


MongoDB 下载地址:MongoDB Download Center



  • Windows Server 2008 R2 64-bit and later,with SSL support x64:适合 64 位的 Windows Server 2008 R2, Windows 7 , 及最新版本的 Window 系统,支持SSL加密。
  • Windows Server 2008 R2 64-bit and later,without SSL support x64:适合 64 位的 Windows Server 2008 R2, Windows 7 , 及最新版本的 Window 系统,不支持SSL加密。
  • Windows Server 2008 R2 64-bit ,withoutSSL support x64:适合 64 位的 Windows Server 2008 R2,Windows Server 2003,或Windows Vista,不支持SSL加密。

(一般选择第一个就好)


下载后安装,一路next安装完成,next、custom,改变安装位置。



把MongoDB安装在C盘目录下,安装完成后,创建数据库文件的存放位置,比如

C:\MongoDB\data\db


然后打开终端,来到bin目录下,输入

mongod --dbpath C:\MongoDB\data\db


打开 127.0.0.1:27017/ ,发现如下提示:

It looks like you are trying to access MongoDB over HTTP on the native driver port.


将MongoDB服务器作为Windows服务运行


重新打开一个终端(一定要管理员身份,这个超级重要),继续来到并目录下,输入

mongod --dbpath "C:\MongoDB\data\db" --logpath "C:\MongoDB\data\log\mongo.log" --install --serviceName "MongoDB"



net start mongodb 用来开启服务,但是提示错误,再关闭mongodb之后就可以了,也就是最开始打开的终端。

打开任务管理器,服务,找到MongoDB,发现MongoDB正在运行。


OK,到这里已经成功安装。


这里补充下如何管理员身份运行,在C盘中找到 cmd.exe ,右键——以管理员身份运行,我的路径是:C:\Windows\SysWOW64



可视化工具

1、Robomongo

选择第一个即可


一路next安装完成打开,新建连接,默认配置就可以



2、PyCharm可视化工具

File——Settings——Plugins——mongo

安装即可,重启之后发现右侧有Mongo Explorer


点击设置按钮,绿色加号,测试连接,OK,安装完成


猜你喜欢

转载自blog.csdn.net/SL_World/article/details/82180136