On Installing MongoDB as a Service on Windows
A few notes to save you some headaches while installing MongoDB as a service on Windows… It seems that it’s common to encounter the results below, so these are some things to remember.
Sat May 01 11:52:40 dbexit:
Sat May 01 11:52:40 shutdown: going to close listening sockets…
Sat May 01 11:52:40 shutdown: going to flush oplog…
Sat May 01 11:52:40 shutdown: going to close sockets…
Sat May 01 11:52:40 shutdown: waiting for fs preallocator…
Sat May 01 11:52:40 shutdown: closing all files…
Sat May 01 11:52:40 closeAllFiles() finished
Sat May 01 11:52:40 dbexit: really exiting now
- Create the data directory, by default that’s c:\data\db\
- It’s easy to forget, so remember to run cmd as Administrator! You won’t get UAC warnings, just the failures above.
- Install with the full path “c:\Program Files\mongodb-win32-x86_64-1.4.2\bin\mongod.exe” –install. If you don’t, the registry setting for the service won’t include the full path
- If you install from a path with spaces (i.e., Program Files) you’ll need to make sure it’s quoted in the registry (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MongoDB\ImagePath)
More on MongoDB in a later post…