MongoDB installed under Windows configuration 2012-08-17 09:48 lsc183 Blog ParkI want to comment (0) font size:T | T
Here is a list of MongoDB installation configurations under Windows, including how to unzip, set up a working directory, set up system variables, and more.
AD:2014WOT Global Software Technology Summit Beijing Station course video release
Installation files: Official website http://www.mongodb.org/downloads
Select the file download for the corresponding system.
One, unzip the file.
Unzip the package, create a folder in the D disk MongoDB, copy all the. exe files in the package to the D:mongodb folder.
Second, establish the working directory.
1. Set up data storage directory D:\mongodb\data
2. Create log file D:\mongodb\log\mongodb.log
Third, set the system variables. To facilitate the management of MONGODB from the console, you do not have to go into the d:mongodb every time.
My Computer--attribute--advanced--environment variable--path in the system variable, plus; D:\MongoDB, note the semicolon in front. Such as:
Third, start the MONGDB service.
Go to the console and enter Mongod.exe--dbpath=d:\mongodb\data. Such as:
The service will start up and will normally appear as follows:
Enter http://localhost:27017/in the browser. will appear
You is trying to access MongoDB on the native driver port. For HTTP diagnostic access, add the port number
The surface service has been started.
Do not close the current console window, another console, enter MONGO. such as:
Indicates that the connection to Mongdb has been successful.
Iv. randomly start the mongdb as a Windows service.
Console input: Mongod.exe--dbpath=d:\mongodb\data--logpath=d:\mongodb\logs\mongodb.log--install
is normally displayed
V. Connect MongoDB
When you enter net start MongoDB in the console, a "Mongo DB service has started successfully" prompt appears.
When you enter MONGO, you connect to test. You can see that the MongoDB service has started successfully in my computer--management--services and applications
Vi. Exception Handling
If an error occurs:
First look at the service start No, if there is no start service first start the service, if the service has been started, it is possible that the last abnormal shutdown MONGO, causing the file to hold the data is occupied, locked. Simply remove the Mongod.lock file from the D:\MongoDB\data. Restart the service.
MongoDB installation configuration under Windows