Sitecore and Mongo: How To Install Mongo DB in 5 Minutes
As of Sitecore 7.5, the 'Sitecore Experience Database' was introduced (xDB). The official xDB blurb is that 'xDB collects all your customer interactions from all channel sources in a real-time, big data repository.' In normal terms, it's real time analytics. In order for xDB to run quickly enough without adding an excessive amount of network traffic, Sitecore moved from the classic analytics SQL database and switched to a NoSQL approach, using Mongo. In today's guide, I'm going to quickly run through how to get Mongo up and running.
Get MongoThe first thing you will need to do is get a copy of Mongo, get your copy here.
Install MongoWhen you run the installer, you'll be greeted with the usual welcome screen, click 'Next' Agree to the T&C's Select 'Complete' installation and then click 'Install'. Mongo will then go off and install all the files you need.
Configuring MongoRunning Mongo is really easy, all you need to do is run 'mongod.exe' found in the Mongo bin folder. In my example with default locations, this is:
C:\Program Files\MongoDB\Server\3.2\binIf you try running Mongo directly you should see a 'Data Directoy Not Found error, like so: To get around this, you either need to create the default Mongo database location'Data\DB', or, configure Mongo to use a location of your choice. When we work with Sitecore, it is very likely that you will probably be working on more than one site, so splitting your different websites' databases into different folders is highly recommended, so option 2 is recommended. If you go for route 2 then I would recommend creating a batch file to save you some time. The batch file would look something like this:
C:\Program Files\MongoDB\Server\3.2\bin\mongod.exe –dbpath [folder location]