Wednesday, October 8, 2014

MongoDB windows 8 installation

  • Download from
  • Install downloaded msi
  • Move installed directory from default location C:\Program Files\MongoDB 2.6 Standard to your user defined location, something without space in naming convention, this is a good practice. Copying the installed folder to another location will not create any issue as MongoDB is self-contained and does not have any other system dependencies. For example: C:\poc\mdb\MongoDB_2.6_Standard
  • Create a  mongo.cfg file with content:
##store data here (make sure you have manually created following directory)

##all output go here (make sure you have manually created following directory)
  • Open command prompt (WIN +X ) and open Comman Prompt (Admin)
  • Type following:
sc.exe create MongoDB binPath= "\"C:\poc\mdb\MongoDB_2.6_Standard\bin\mongod.exe\" --service --config=\"C:\poc\mdb\mongod.cfg\"" DisplayName= "MongoDB_2.6_Standard" start= "auto" 
  • MongoDB service is successfully installed if you see following msg:
[SC] CreateService SUCCESS
  • Start MongoDB service:
net start MongoDB
  • To stop MongoDB service:
net stop MongoDB
  • To delete MongoDB service
sc.exe delete MongoDB


No comments:

Post a Comment