您的位置:首页 > 数据库 > Mongodb

欢迎使用CSDN-markdown编辑器

2017-08-25 15:44 218 查看

Windows Mongodb 服务安装

下载:mongodb-win32-x86_64-enterprise-windows-64-3.4.7-signed.msi

双击安装

配置Path环境变量:E:\Program Files\MongoDB\Server\3.4\bin

Mongodb 服务安装:

在运行中输入cmd, 右键选择“以管理员身份运行”



在cmd 窗口中输入:

mongod --logpath="E:\Program Files\MongoDB\Log\logs.txt" --dbpath="E:\Program Files\MongoDB\Data" --directoryperdb --serviceName="MongoDB" --serviceDisplayName="MongoDB" --install




这就能看到你安装的服务了。

附录

(1)错误:Error connecting to the Service Control Manager: 拒绝访问。

可能原因:

(a)是以管理员登录的系统,但是没有以管理员身份运行cmd

(b)以管理员身份运行cmd后,切换了目录

(2)错误:exception in initAndListen: 72 Requested option conflicts with current storage engine option for directoryPerDB; you requested true but the current server storage is already set to false and cannot be changed, terminating

可能原因:在安装Mongodb 服务之前,Data 目录应该是空的(不能在安装mongodb服务之前mongodb –dbpath=…\Data 启动mongo服务)

解决办法:删除Data目录下的所有内容
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  windows mongodb