MongoDB was last installed and configured under Mac, this time under Windows also try to install and configure MongoDB.
1, first download MongoDB compression package, download and extract to D or e disk. As follows:
2. Configure environment variables: desktop-Computer right-properties-left "advanced system settings"-Environment variables-Find path, click "Edit",
Copy the path to the bin directory E:\mongodb\bin, add to path (note the path preceded by a semicolon), as follows:
3, create the database directory E:\MongoDB\data, first switch to the E:\MongoDB\bin directory to execute the following command:
Where--dbpath is the specified database storage directory, there are two "-" to be aware of
Mongod--dbpath E:\MongoDB\data
The results are as follows:
Some startup information is printed in the window, and if the following information is found, the start is successful:
Look at the directory structure of the files at this time as follows:
Open the browser, enter:localhost:27017 or 127.0.0.1:27017, you can see the window display information:
4, using the database: crtl+t Open a new command window, switch to the E:\mongodb\bin directory, enter the MONGO command, as follows:
At this point, MongoDB is installed and configured successfully on Windows.
Installing and configuring MongoDB under Windows