1. Go to the official website to download and install: Https://www.mongodb.com/download-center#atlas;
Or: http://dl.mongodb.org/dl/win32/x86_64 here to download, and then select the appropriate version;
2. After the download is complete, unzip to the D or C drive root directory :
3. Create the required folders: D:\mongodb\data\db, D:\mongodb\data\log\mongod.log; Install DB and log files respectively;
4. Start the service: Here are two types of command-line methods:
① Switch to the bin directory of the MongoDB directory, execute the Mongod.exe :
Mongod--dbpath D:\mongodb\data\db
The above information appears in CMD, which proves that the MONGDB service has been started and the port number is: 27017
② Configuration service: Execute the following statement in the Bin directory : (Where: servicename represents the service name, using administrator status)
Mongod.exe--dbpath "D:\mongodb\data\db"--logpath "D:\mongodb\data\log\mongod.log"--install--servicename "MongoDB"
Installing MongoDB under WIN10