I like applications that are distributed in ZIP files, because then it usually means that they don’t rely on the registry and all other kinds of nasty stuff that makes it hard to clean up afterwards.
But today, when I wanted to install the newest MongoDB 2.6 on a Windows server and I did the usual
mongod --install --logpath e:\logs\mongodb\log.txt --dbpath e:\data\mongodb
in an elevated command prompt, nothing happened.
When I checked out the log file in
e:\logs\mongodb\log.txt it said “–install has to be used with –logpath” – but I did specify the log path, I know you have to do that, and I always do that.
After trying this a few times, I thought: Well, until now I’ve done in-place upgrades of MongoDB whenever there was a new version, so why not just install 2.4 (which I know can be installed), and then replace the binaries with the 2.6 ones.
Which I did – and it worked!
So this is how you can install the current MongoDB version 2.6 as a Windows service, even though it seems to be a little off with its command line parameter checking.
PS: I just Googled to see if anyone else has experience this issue – it seems they already know about it + the workaround. Seems the 2.6 release was shipped a little too soon 😉 (PPS: We all do that sometimes…)