One, about using MongoDB on Windows
Mongodb
Official documentation-Installing MONGODB under Windows
Note: MongoDB does not support Windows XP systems
It is also easy to install MongoDB on Windows, click on the link above to download the 32-bit or 64-bit zip compression package. Or MSI directly installed, the installation package on Windows is larger, more than 110M.
After downloading, unzip the file, or directly run the MSI, where MSI installed directly after the default installed in the C:\Program files, to find the beginning is MongoDB, that is. Here are the steps that I configured:
Set up folder in D-Disk MongoDB
Cut all files in the bin directory of the extracted files directory into the D-Disk MongoDB folder
Run the shortcut key "Win+r", run cmd, go into the MongoDB folder, enter
D:CD MongoDB
4. Under MongoDB, create a new folder data, create a new DB folder and log folder, and separate the
5. Set the directory environment and continue typing in cmd
Mongod--dbpath D:\mongodb\data\db
6. After the setup is complete, the configuration is complete, and the input MONGO in CMD will enter the MongoDB database.
Mongo
If you exit, you can export the exit directly.
Exit bye
Second, MongoDB service configuration
7. Create a profile to hold the log path and enter it in CMD:
D:\mongodb>echo logpath=d:\mongodb\logs\mongo.log > "D:\mongodb\mongod.cfg"
8. Install the MongoDB service to start the boot without having to start mongod each time, enter in cmd:
"D:\mongodb\mongod.exe"--config "D:\mongodb\mongod.cfg"--install
9. Start the MongoDB service and enter it in CMD:
net start MongoDB
10. If the MongoDB service is stopped, use the cmd command:
net stop MongoDB
11. Remove the Mongod service and enter it in CMD:
"D:\mongodb\mongod.exe"--remove
Almost complete configuration here, of course, in the installation may also encounter some problems, here is not a detailed statement.
Xiao Bai to learn MongoDB (ii)