I am new to mongodb and not getting how to install it since i dint find videos or any helpful resources to achieve the same. Please help me for installing mongodb on windows 7 with the exact steps. I tried downloading recent version of mongodb from the site and its unsuccessful. Thanks in adcance.
Regards,
Vijay
MongoDb for 64 bit Windows This version of MongoDB runs only on newer version of Windows contains 64 bit operating system. for example: Window Server 2008 R2, Window 7 64 bit etc.
MongoDB is available in both the versions which support their respective 32-bit & 64-bit windows.
Go to link and Download MongoDB Community Server. We will install the 64-bit version for Windows. Click on the “complete” button to install all of the components. The custom option can be used to install selective components or if you want to change the location of the installation.
Steps:
Review MongoDB folder.
In MongoDB, it contains only executable files 10 Plus(exe) in the bin folder. This is true, and That are the required files to MongoDB, it's really hard to believe for a developer like me Who eats from a relation database background.
path:- Files under $MongoDB/bin folder
Configuration File
Create a MongoDB config file, it’s just a text file, for example C:\mongodb\mongo.config
:
#store data here
dbpath=C:\mongodb\data
\\all output go here
logpath=C:\mongodb\log\mongo.log
\\log read and write operations
diaglog=3
Run MongoDB server
Use mongod.exe --config C:\mongodb\mongo.config
to start MongoDB server.
C:\mongodb\bin>mongod --config C:\mongodb\mongo.config
All output going to: C:\mongodb\log\mongo.log
Connect to MongoDB
Uses mongo.exe to connect to the started MongoDB server.
C:\mongodb\bin>mongo MongoDB shell version: 2.2.3 connecting to: test
//mongodb shell
MongoDB as Windows Service
Add MongoDB as Windows Service, so that MongoDB will start automatically following each system restart.
Install as Windows Service with --install
.
C:\mongodb\bin> mongod --config C:\mongodb\mongo.config --install
A Windows service named “MongoDB” is created.
To start MongoDB Service:
net start MongoDB
To stop MongoDB Service
net stop MongoDB
To remove MongoDB Service
C:\mongodb\bin>mongod --remove
Reference Link Install Mongodb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With