views:

1658

answers:

1

How to setup MongoDB so it can run as windows service?

Thanks

+8  A: 

I think if you run it with the 'install' command line switch it installs it as a Windows Service.

mongod --install

It might be worth reading this thread first though. There seems to be some problems with relative/absolute paths when the relevant registry key gets written.

Stephen Curran
i finally managed to install by execute this:mongod.exe --service
Hery
It seems like what you really need to do is enter the full path at the command line: c:\> c:\mongodb\bin\mongod.exe --service. However, make sure to run the command window as administrator (especially on windows server) otherwise you'll be thwarted by UAC.
JC Grubbs