Install Mongo DB on Window
If you are working on Sitecore then mongo db compulsory to install for storing data.
So here I am write some simple steps to install mongo db.
Firstly, we have to download MongoDB so we can download zip
file from this link as per suitable version. Download
so once you finish download just extract this folder on D:
drive under MongoDB folder or where you want. I have just put on D drive. Go inside
bin folder and copy this address.
Note: MongoDB
folder I have created.
Open command prompt as admin mode and switch directory and
paste this path to go inside this folder
Second Step we have to create data folder under MongoDB
folder and one more folder we have to create with db name under data
folder to store data.
Let’s move on command prompt to run mongo. You already in
bin folder so just copy below command and paste it.
mongod.exe
--dbpath "D:\MongoDB\data\db"
when press enter it will show you waiting for connections
message which is indication you that mongod.exe running successfully.
For verify you can download Robo 3 T. its provide you GUI.
here you can connect with your local host and see your database data.
If we want to install mongo service as a window service,
then we have to run one more command.
mongod --logpath "D:\MongoDB\logs.txt"
--install --serviceName "MongoDB
After press enter it will show you message that service
created successfully. Now you can start the service by command or go in
services and choose MongoDB service and press start button.
Hopefully you will be installed MongoDB.
Happy Coding!
Comments
Post a Comment