1. Download the Windows version of the MongoDB database
Download the MongoDB version of Windows to the official download page, 32-bit or 64-bit to choose from your own situation
Http://www.mongodb.org/downloads
2. Installation Preparation
Unzip the downloaded compressed package and place it where you want to put it, create a folder called DB in the directory and a Log.txt file
DB folder for storing databases
Log.txt Log for recording MongoDB
3. Install MongoDB
The way to do this is to install MongoDB as a service for Windows, open the command line for Windows (Note: Please start the command line with Administrator privileges ) and move to the Bin folder in your MongoDB directory, where I demonstrate the path is D:D Evenvmongodb
Enter the following command to register MongoDB as a Windows service:
Mongod.exe--install--logpath=d:devenvmongodblog.txt--dbpath=d:devenvmongodbdb
--install parameter is set to install as server
The--logpath parameter is the path to set the log file, Log.txt is the file that was created in the previous step
The--dbpath parameter is the location where the database files are stored, and the DB folder has been created in the previous step.
The results of the implementation are as follows:
then enter
net start MongoDB
You can start the MongoDB service
After startup, and then to the command line input
Mongo
If you successfully enter the MONGO shell environment (see figure below), then the MONGODB has been installed successfully, start your NoSQL trip!