views:

81

answers:

1

In order to get sharding to work I need to run two copies of mongod.exe. One as a shard and one as the config server. How can I install both mongod instances as windows services?

A: 

Use sc.exe from the Windows Resource Kit ( http://support.microsoft.com/kb/251192 ) which allows you to specify an unique display name for each instance:

sc.exe create "Mongo DB 1" binPath= "c:\mongodb\bin\mongod.exe --service --dbpath=c:\data\db --logpath=c:\data\log.txt"

mischa_u