简体   繁体   English

由于dbpath,我无法安装MongoDB

[英]I cannot install MongoDB because of dbpath

while installing MongoDB on my windows 7 64-bit, when I execute command 在我执行命令时在Windows 7 64位上安装MongoDB时

C:\mongodb\bin\mongod.exe --dbpath d:\test\mongodb\data

it gives me error that switch dbpath is not recognized and when I check in its help, I really cannot find this --dbpath switch. 它给我一个错误,即开关dbpath无法识别,当我检查它的帮助时,我真的找不到此--dbpath开关。

any help where i'm doing mistake? 任何我做错的帮助吗?

It looks right, on my system (windows 10) the following command line works to set up up as a windows service. 看起来不错,在我的系统(Windows 10)上,以下命令行可以设置为Windows服务。

C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe --storageEngine wiredTiger --dbpath "C:\mongodata\db" --logpath "C:\mongodata\log\mongo.log" --serviceName yourname --serviceDisplayName "your description" --install

from the help: 来自帮助:

C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe -help
  --dbpath arg                  directory for datafiles - defaults to \data\db\
                                which is D:\data\db\ based on the current 
                                working drive

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM