It is more comfortable to install MongoDB under Windows, the following steps:
1; MongoDB's official website, https://www.mongodb.org, according to the corresponding operating system to download a good version of the corresponding.
2. Unzip to the directory you want to install, such as D:\mongodb
3: Then create a data/db, which is the data storage directory, wear create a log directory Data/log
D:\mongodb\data\db
D:\mongodb\data\log\MongoDB.log
4: Configure the environment variables so that each time you enter into D:\mongodb\bin to use the command
Configuration
5: Add the MONGO background service to the service entry with the following command:
Mongo-servicename "MongoDB"
Here to note, to ensure that the current MONGO background is normal exit, illegal exit will be in the DB directory to generate a mongo.lock file, delete can.
After the build:
6: Test Connection
Run the MONGO command,
As you can see, the test was successful
At this point, MongoDB installed successfully under Windows, refueling
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Installing MongoDB under Windows