Starting with version 2.2, MongoDB does not support Windows XP. Use recent versions of Windows to use the latest version of MongoDB.
Download Page http://www.mongodb.org/downloads
Run the file directory on D:\mongodb
Create a storage location for the database file, d:/mongodb/data/db. You must create a storage folder for the database files before you start the MongoDB service, otherwise the command will not be created automatically and cannot start successfully.
-
Open cmd command line, go to D:\mongodb\bin directory
Enter the following command to start the MongoDB service:
D:/mongodb/bin>mongod--dbpath D:\mongodb\data\db
-
MongoDB default connection Port 27017, if it occurs, you can open http://localhost:27017 view, found that the connection is successful, if not successful, you can see whether the port is occupied.
can actually set MongoDB as a Windows service, this operation is for convenience, each time the power on MongoDB automatically started. D:\mongodb\data Create new folder log (log file) and create new file Mongodb.log
New file in D:\mongodb mongo.config
Open mongo.config input with Notepad:
dbpath=d:\mongodb\data\db
Logpath=d:\mongodb\data\log\mongo.log
Open the cmd command line with Administrator , enter the D:\mongodb\bin directory, and enter the following command:
Mongod.exe-- Install--config D:\mongodb\mongo.config
is set to service after CMD ( Administrator permissions Open the Windows CMD window ) window to start or stop MongoDB in a service way.
net start MongoDB start MongoDB service
net stop MongoDB start MongoDB service
Under-Windows MongoDB installation