您的位置:首页 > Web前端 > Node.js

node.js在windows下服务不成功

2016-06-15 12:07 603 查看
net start mongodb 不成功,试了网上很多方法,还是不行

mongod --dbpath "D:\mongodb\data\db" --directoryperdb --logpath "D:\mongodb\data\log\mongodb.log" --install --serviceName "MongoDB"

mongod --dbpath "D:\mongodb\data\db" --directoryperdb --logpath "D:\mongodb\data\log\mongodb.log" --remove --serviceName "MongoDB"

mongod --install --directoryperdb --dbpath D:\mongodb\data\db --logpath D:\mongodb\data\log\mongodb.log --logappend --rest --serviceName "MongoDB"

mongod --install --directoryperdb --dbpath D:\mongodb\data\db --logpath D:\mongodb\data\log\mongodb.log --logappend --rest --serviceName "MongoDB"

On windows you first have to
install mongodb as a service using the --install option.
The commands you can use a command similar to the following to install it as a service.
mongod --install --directoryperdb --dbpath C:\mongodb-win32-x86_64-2.4.6\data --logpath C:\mongodb-win32-x86_64-2.4.6\log\mongodb.log --logappend --rest
The command above must be run with administrator privileges. After that is done you can then use the net start and net stop commands provided by Hugo. – Ed Ost Aug 31 '13 at 19:41


mongod --dbpath D:\mongodb\data\db
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: