Tuesday, April 19, 2016

Installing MongoDB on a Windows machine as a service

The great experience analytics features (including the experience profile) in Sitecore 8 and beyond require the use of MongoDB. MongoDB is not like common database management servers (such as SQL Server or Oracle) whom use tables and rows, MongoDB instead stores data dynamically in the JSON format. The instructions to install MongoDB on your windows machine (as a service) are as follows.

  1. Download the latest version of MongoDB from the downloads page (3.2 at time of writing)
  2. Run the MSI installer package
    1. Accept the license agreement
    2. Select the complete installation (this will install MongoDb at C:\Program Files\MongoDB - custom will allow you to select a location)
    3. Click install
  3. Now to run MongoDB as a service, open the command prompt (in administrator mode)
    1. Run the command cd C:\Program Files\MongoDB\Server\3.2\bin to point the command prompt to the correct location
    2. Create the following directories:
      1. C:\Mongo\db
      2. C:\Mongo\logs
    3. Run the command mongod --dbpath="C:\Mongo\db" --logpath="C:\Mongo\logs\log.txt" --install to install the database
    4. Run the command net start MongoDB to start running MongoDB
MongoDB should now be running as a service.

No comments:

Post a Comment