Install the latest version of MongoDB 4.0 in Windows

Download MongoDB

Download: https://www.mongodb.com/download-center?jmp=nav#community

 
Download Page .png

Download completed
 
image.png

installation
 
Installation interface .png

 
Accept the terms of interface .png

 
Personalize .png

 
Change the path .png

 
The establishment of the installation path .png

 
.Png path settings

 
Database, log path settings .png

 
Do not install MongoDB Compass.png

 

Settings

Open Terminal (with Run as Administrator)
cd C:\MongoDB\bin
mongod --dbpath C:\MongoDB\data\db

 
Execute the command window .png

In the browser address bar enter: 127.0.0.1: 27017
Tip: It looks like you are trying to access MongoDB over HTTP on the native driver port.
 
The browser prompts .png

Re-open a terminal (Run as administrator)
1, cd C:\MongoDB\bin
2, mongod --dbpath "C:\MongoDB\data\db" --logpath "C:\MongoDB\data\log\mongo.log" --install --serviceName "MongoDB"
execute the following command prompt appears
 
image.png

Close all terminals to re-open a terminal (Run as administrator)
started successfully
 
image.png

 
Service started successfully .png



Author: Blue Sword Wolf
link: https: //www.jianshu.com/p/0346c451941f
Source: Jane books

Guess you like

Origin www.cnblogs.com/xiongdongdong/p/11388498.html