Installation files: Official Website http://www.mongodb.org/downloads
Select the file to download from the system.
1. decompress the file.
Decompress the compressed package, create a folder named mongodbon on the d Drive, and copy all the. exe files in the compressed package to the D: MongoDB folder.
2. Create a working directory.
1. Create a data storage directory D: \ mongodb \ data
2. Create a log file D: \ mongodb \ log \ mongodb. log
3. Set system variables. To facilitate mongodb management from the console, you do not need to enter D: MongoDB every time.
My computer -- Property -- Advanced -- environment variable -- path in the system variable, plus; D: \ MongoDB, note that the semicolon is added before. For example:
3. Start the mongdb service.
Enter mongod.exe -- dbpath = D: \ MongoDB \ data in the console. For example:
In this way, the service is started. Normally, the following is displayed:
Enter http: // localhost: 27017/in the browser /. Will appear
You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number
The surface service has been started.
Do not close the current Console window. Start another console and enter mongo. Example:
Indicates that mongdb is successfully connected.
4. Use mongdb as a windows Service for random startup.
On the console, enter mongod.exe -- dbpath = D: \ mongodb \ data -- logpath = D: \ mongodb \ logs \ mongodb. log -- install
Normally
V. Connect to mongodb
Enter "net start mongodb" in the console and the message "Mongo DB service started successfully" appears.
Enter mongo and you will be connected to test. In my computer -- manage -- service and application, you can see that the MongoDB service has been successfully started.
Vi. Exception Handling
If an error occurs:
Check whether the service is started. if the service is not started, start the service first. if the service is started, it may be because mongo was disabled improperly last time, and the data storage file is occupied, locked. Delete the mongod. lock file in D: \ MongoDB \ data. Restart the service.
Edit recommendations]
- MongoDB 2.0 official version released
- View the Compact Command one by one in the new functions of MongoDB 2.0
- Comprehensive Evaluation of mainstream NoSQL databases-MongoDB
- How to use MySQL to learn MongoDB
- MongoDB setup and simple operations in Windows