1. Download MongoDB
Download .msi installer file from MongoDB download page.
Choose Windows 32bit or 64bit platform.
Double click the .msi
file and follow the set of screens to finish installation process.
2. MongoDB directory structure
In MongoDB, we have
required executable files only in bin directory. It doesn't have any
other system dependencies.
We can specify the
installation directory if you choose "Custom" installation
option.(e.g. F:\mongodb)
You can add
F:\MongoDB\bin path Windows Environment variable, so that you can access
the MongoDB commands from any location in Command Prompt.
3. Configuration
MongoDB requires a data
directory to store the data. MongoDB default's data directory is
"C:\data\db".
We can create
alternative path and specify path in configuration file. We should specify this
data directory path with --dbpath option while running MongoDB.
For example:
F:\mongodb\mongo.config
dbpath=F:\mongodb\data\db
logpath=F:\mongodb\log\mongo.log
4. Start/Stop MongoDB Server
We can start MonngoDB
server by using mongod.exe file with the option --config F:\mongodb\mongo.config.
F:\MongoDB\bin>mongod
--config F:\mongodb\mongo.config
5. Connect to MongoDB Server
We can mongo.exe file to
connect the MongoDB server.
F:\MongoDB\bin>mongo.exe
MongoDB shell version:
3.0.6
connecting to: test
>
Read also : How to install mySql server on windows7
No comments:
Post a Comment