Sitecore/Config MongoDb

Sitecore/Config MongoDb

One if the requirements to set up and run Sitecore in your machine is installing mongodb. However, the documentation is a bit tricky.
Following the steps in this post, hopefully you will find it much easier.

Install MongoDB

MongoDB is needed for Sitecore analytics data.
To install MongoDB:

  1. Download MongoDB from link
    you will need to fill up a form then you will have access to msi file.
  2. Run the Mongo installer that you downloaded from step 1.
  3. Choose the Custom install setting and decide on the installation folder.
  4. Click Next until you finish the installation.

You also can go with scripts and run the installation command with Choco:

cinst mongodb

Set up MongoDB as a Windows Service

If MongoDB has installed successfully, the next step is to register it as a Windows Service.

  1. Create a main folder with 2 sub-folders, for example :
  1. Inside data folder create a config file (XML configuration file) for example name it mongo.config. Change it's content to the following text:
  1. Open cmd (command prompt) in administrator mode and type following command:
"C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe" --config "C:\data\mongo.config" --install

First path is the location mongo in installed and second path is the folder you created.
2. If you have successfully registered Mongo as service, do a Windows search for services.
4. Check the status column of the service and confirm it is running. If not, try to start the service.
5. It is now ready to go