Windows下注册MongoDB为服务

命令如下:

mongod.exe –logpath “D:\Soft\mongodb2\logs” –logappend –dbpath “E:\database\mongodb\2” –directoryperdb –serviceName mongodb_servicename –serviceDisplayName mongodb_servicename –serviceDescription MongoDB –serviceUser mongodb –servicePassword userpassword –install

发表回复