MongoDB Installation and startup
Zhou Jianxu 2014-08-10
Configure environment variables after decompression
Download the Windows 32-bit or 64-bit version and unzip, the program files are in the bin directory, the other two directories are C + + calls the header file and the library file.
The Bin directory contains the following programs:
1. Mongo.exe, command-line client tools.
2. Mongod.exe, database service program.
3. Mongodump.exe, database backup program.
4. Mongoexport.exe, Data Export tool.
5. Mongofiles.exe,gridfs tools.
6. Mongoimport.exe, data import tool.
7. Mongorestore.exe, Database recovery tool.
8. Mongos.exe, seemingly a performance testing tool.
Cmd Enter MONGO to see if the success
I'm going to start MongoDB in three different ways.
Mode one : CMD Command Console input mongod--dbpath d:\mongodata
D:\mongodata is the path to the database , which can be created automatically without any folders.
Method Two : Batch File
See a . bat file to paste mongod--dbpath d:\mongodata into the inside , you can use this . Bat The file starts.
Mode three : registering as a Windows system service
D:\soft\mongodb\mongodb-win32-x86_64-2.4.0\bin\mongod.exe--logpath D:\soft\mongodb\mongodb-win32-x86_64-2.4.0\ Mongolog\mongodb.log--logappend--dbpath D:\soft\mongodb\mongodb-win32-x86_64-2.4.0\mongodata--directoryperdb-- ServiceName MongoDB--install
Incmdcommand in the text above or a set of commands above,Note that mongolog and mongodata should be created first. mongodb.log files are log files,MongoDB is created automatically.
randomly start MongoDB as a Windows Service
(If prompted:Error connecting to the Service Control ManagerThis error, you should run with administratorcmdFind the command handlerc:\windows\system32\cmd.exe right: Run as Administrator )