启用mongoDB Windows服务

时间:2014-08-07 10:06:37

标签: windows mongodb database

我想在我的Windows服务器中启用mongoDB服务。这些是我使用的代码和它们的输出,但是没有用。 (我作为管理员在powershell中运行它们)

PS C:\Program Files\MongoDB 2.6 Standard\bin> .\mongod.exe --remove
2014-08-07T14:10:16.555+0430 Trying to remove Windows service 'MongoDB'
2014-08-07T14:10:16.557+0430 Could not find a service named 'MongoDB' to remove
PS C:\Program Files\MongoDB 2.6 Standard\bin> .\mongod.exe --install --dbpath c:\db --logpath c:\db\logs
PS C:\Program Files\MongoDB 2.6 Standard\bin> .\mongo.exe
MongoDB shell version: 2.6.0
connecting to: test

2014-08-07T14:11:02.640+0430 warning: Failed to connect to 127.0.0.1:27017, reason: errno:10061 No connection could be made because the target machine actively refused it.
2014-08-07T14:11:02.644+0430 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at
 src/mongo/shell/mongo.js:146`

exception: connect failed

在日志文件中我有这个:

2014-08-07T14:13:06.848+0430 --install has to be used with --logpath

我该如何解决?

0 个答案:

没有答案