Hi All,
Today we discuss Mongo DB for the Sitecore developer.
For understanding basic of mongo DB and installation process please follow this
blog.
In the above described blog, you can understand
basic of MongoDB and how to install as window service.
But in above blog, there is some limitation for creating window service.
For make that process simpler I created a bat file for that named as below:
1.
mongo create service.bat
2.
mongo remove service.bat
#mongo create service.bat:
This is used for creating window service for mongo
That prompt you some basic things fill those according to your configuration.
Like it's asking for some input as below:
1. Please enter mongod.exe path: Copy and paste the path of the mongod.exe file which is generally found under mongo DB \bin folder.
eg: c:\Program Files\MongoDB\Server\3.4\bin\mongod.exe
or
c:\mongodb\bin\mongod.exe
2.Please enter dbPath: Here you can specify the path where you want to store mongo database.
eg: E:\Projects\sampleproject\mongodb\reports
3.Please enter logpath: That point to a .log file that store the logging information of mongo server.
eg: E:\Projects\sampleproject\mongodb\reports\log\mongodb.log
4.Please enter serviceName: Here just specify the MogoService name.
eg: MongoDB
5.Please enter serviceDisplayName: Here just specify the MogoService display name.
eg: MongoDB
After following these steps window service is created.
#mongo remove service.bat:
That bat is used for delete exisiting window service which you wanna remove.
it's ask for some input as below:
1. Please enter mongod.exe path: Copy and paste the path of mongod.exe file which is generally found under mongo db \bin folder.
eg: c:\Program Files\MongoDB\Server\3.4\bin\mongod.exe
or
c:\mongodb\bin\mongod.exe
2.Please enter serviceName : Here just specify the MogoService name.
eg: MongoDB
After follow these steps window service is removed.
Hope you enjoy this.
Note: Keep in mind that always run .bat file with admin privilege. For that right click on .bat file and select
Run as administrator option.
References:
https://stevenstriga.wordpress.com/2017/02/25/sitecore-mongodb-blog-series-intro-to-mongodb-for-sitecore-developers/
https://stevenstriga.wordpress.com/2017/02/28/sitecore-mongodb-blog-series-out-of-the-box-sitecore-databases/
https://briancaos.wordpress.com/2014/10/01/sitecore-and-xdb-setting-up-mongodb-on-your-developer-machine/
https://www.mongodb.com/lp/contact/mongodb-sitecore