The first logical step is to downloaded mongo for windows here: http://www.mongodb.org/downloads
Then I will try to follow the steps of this page: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/
For my first test, I have try to run it manually:
- I have create a data folder: C:\Program Files\MongoDB 2.6 Standard\data\db
- Then in command line I have type the following command:
cd C:\Program Files\MongoDB 2.6 Standard\bin mongod.exe --dbpath "C:\Program Files\MongoDB 2.6 Standard\data\db"
Two things here:- You need to use the mongod.exe and not the mongo.exe. Mongod.exe is the service and mongo.exe the client.
- If I didn't specify the path to the data folder it doesn't work event if I move it below \bin.
So ok, I have a running mongo server now. But, if I don't want to run it manually each time I restart so, let's configure it as a windows service:
- Create a directory for the logs: C:\Program Files\MongoDB 2.6 Standard\logs
- Create a new empty file for the configuration: C:\Program Files\MongoDB 2.6 Standard\bin\mongod.cfg and add the following content in it:
logpath="C:\Program Files\MongoDB 2.6 Standard\logs\mongo.log" dbpath="C:\Program Files\MongoDB 2.6 Standard\data\db"
- Now, register the windows service by executing the following command:
sc.exe create MongoDB binPath= "\"C:\Program Files\MongoDB 2.6 Standard\bin\mongod.exe\" --service --config=\"C:\Program Files\MongoDB 2.6 Standard\bin\mongod.cfg\"" DisplayName= "MongoDB 2.6 Standard" start= "auto"
- By curiosity, I do a little check to be sure that the service is registered by typing "services.msc" and this is ok I see that the service:
- To be sure that this service work correctly, let's start it:
sc.exe start MongoDB
If you have the message: "The service did not respond to the start or control request in a timely fashion." this probably mean that your cfg file is not correctly
Ok now, my mongo service is up and running, let's install Sitecore 7.5! I will not explain every steps here because it is the same as into the previous version but the interesting stuffs for this setup are into the connectionstrings.config. We have now the following connectionstring who use mongo (if you use DMS):
<add name="analytics" connectionString="mongodb://localhost/analytics" /> <add name="tracking.live" connectionString="mongodb://localhost/tracking_live" /> <add name="tracking.history" connectionString="mongodb://localhost/tracking_history" /> <add name="automation.live" connectionString="mongodb://localhost/automation_live" /> <add name="automation.history" connectionString="mongodb://localhost/automation_history" /> <add name="session" connectionString="mongodb://localhost/session" />For the basic config on my developer's computer this is ok like this. I can run my new instance of sitecore. And.... ok no crash at least :-)
Let's check if my dbs has been created into mongo:
- In command line, I type:
mongo
Response is:MongoDB shell version: 2.6.0 connecting to: test
Type:show dbs
Response is:admin (empty) analytics (empty) automation_history (empty) automation_live (empty) local 0.078GB mydb 0.078GB tracking_history (empty) tracking_live (empty)
Let's browse a page or two into the website and check my Experience Profile Dashboard...Bingo! I have a record in my dashboard so it work:
After I install the service I usually use ServiceTray to monitor it. Nice, free tool. http://www.coretechnologies.com/products/ServiceTray/
ReplyDeleteNice post, a nice management tool for mongo is http://robomongo.org/
ReplyDeleteits really awesome information provided by you. You can also get complete info on MangoDB here
ReplyDeleteYou can simplify MongoDB installation using following project:
ReplyDeletehttp://alienlab.co.uk/mongodb-windowsservice-installer
Nice blog and absolutely outstanding. You can do something much better but i still say this perfect.Keep trying for the best. Mongo Database Services
ReplyDelete