- Download MongoDB this link link.
- 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 exampleC:\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
Usemongod.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 Servicenet stop MongoDB
To remove MongoDB ServiceC:\mongodb\bin>mongod --remove
Thursday, August 31, 2017
Mongo DB Environment Set Up
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment