Last Updated on January 30, 2021 by sandeeppote

Download and Install Mongo db for your OS from https://www.mongodb.com/download-center#community

Created a folder to store the collected data in mongodb e.g.:- C:Path\mongodb

Create a log folder in mongodb folder and create mongodb.log file.

Execute the below in command from the path where mongo is installed or set the global variables to execute this command.Update the path accordingly

mongod --dbpath "C:\Path\mongodb" --serviceName "LocalMongoDB" --logpath "C:\Path\mongodb\log\mongodb.log" --logappend --install

You should see in you serives (run services.msc) mongo service which will be in stopped state. Start the mongo db service.You may start monngodb from command prompt. For more details see this -https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes/