Before looking at Windows install MongoDB operation is very simple, today in your own notebook installed, a variety of small problems. Refer to the online great god posts, and then record the next simple process to remember later.
1.MongoDB official Web Download installation package
2. Run the installation package and select "Custom" to customize the installation path under Modify: D:\software\MongoDB, the middle install MongoDB compass must not be checked, the installation of the basic card master does not move, You can install and then download Compass on your own website and then continue to "next", install to the end.
3. Where to create the database file
Create Db:d:\software\mongodb\data\db
Because you need to create a storage folder for the database files before you start the MongoDB service, the command is not created automatically and does not start successfully.
4. Start MongoDB Service
1. Open cmd command line
2. Enter the D:\software\MongoDB\bin directory (note: Enter D: Enter D, then enter the CD D:\software\MongoDB\bin)
3. Enter the following command to start the MongoDB service: Mongod--dbpath D:\software\MongoDB\data\db
At this point, when the default startup, the service has started, the port default 27017. But online various said direct browser input http://localhost:27017 can be verified, but I also have been unable to find the page, verified that the service is started, it may be Win7 will have this problem appear, You can log in using a compass that was previously downloaded separately.
5. Configure the local Windows MongoDB service
This can be set to power-on self-boot, can be directly started off manually, can be started by command line net start MongoDB.
1. First create a new folder under the data file log (to hold the log file)
2. Create a new configuration file in MongoDB mongo.config
3. Open the Mongo.config with Notepad and enter:
Dbpath=d:\software\mongodb\data\db
Logpath=d:\software\mongodb\data\log\mongo.log
4. Open cmd as Administrator:
CMD jumps to the D:\software\MongoDB\bin directory first.
Input: Mongod--config D:\software\Mongodb\mongo.config--install--servicename "Mongodb"
That is, based on the Mongo.config profile installation service you just created, the name is MongoDB.
Win7 under MongoDB installation configuration