[英]MongoDB windows service install
我正在尝试使用该cmd命令为MongoDB配置Windows 7(32位)服务:mongod.exe -f mongo.conf --install --serviceName mongoDB --serviceDisplayName“ MongoDB Windows服务” --serviceDescription“ MongoDB”
-f mongo.conf is a reference to my configuration file located in the same directory with mongod.exe.
this is how my mongo.conf looks like:
dbpath = C:\Program Files\MongoDB 2.6 Standard\data
logpath = C:\Program Files\MongoDB 2.6 Standard\logs\mongo.log
port = 27017
and yet, when i'm trying to run the command, mongo logs to me:
--install has to be used with --logpath
anyone has an idea what is wrong with that?
在-f
参数中使用完整路径:
--install -f "C:\Program Files\MongoDB 2.6 Standard\mongod.conf"
(注意:我尚未尝试使用文件夹名称中的空格进行此操作)
服务工作目录不是您安装它们的目录或它们的exe所在的目录,而是%windir%\\ system32目录 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.