mongodb as a service

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/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s