Installation Tutorial Source: Https://jingyan.baidu.com/album/d5c4b52bef7268da560dc5f8.html?picindex=1
First step: Download the installation package and add the path
MongoDB website website
MongoDB easy to be wall, if not download, please point mongodb-win32-x86_64-2008plus-ssl-3.4.1-signed.msi network password: sj5m
Select the custom installation path and then install it. Here I choose to install in
The path to the bin in the folder is then added to the system path.
Step Two: Create the database file storage address
- Create a database file storage address, such as d:/mongodb/data/db, that is, a new data folder, and then create a new DB folder inside
- Create log file storage directory: D:\Development_Tools\MongoDB\data\log\mongodb.log
- Create a blank log file: D:\Development_Tools\MongoDB\mongodb.config
2.3 Are created text documents, 3 is saved as config file type
Open Mongo.config input with Notepad:
Dbpath=d:\mongodb\data\db
Logpath=d:\mongodb\data\log\mongo.log
Step three: Start the MongoDB service
Open the CMD window and switch to the bin directory:
First Enter D: Enter the D drive and enter the CD D:\mongodb\bin
Enter the following command to start the MongoDB service:
D:/mongodb/bin>mongod--dbpath D:\mongodb\data\db
Open Browser, Address bar input: http://localhost:2701
If the following appears, it indicates that the success has started:
Fourth step: Add MongoDB to the Windows service
Open the cmd command line as an administrator , enter the D:\mongodb\bin directory, and enter the following command:
D:\mongodb\bin>mongod--config D:\mongodb\mongo.config--install--servicename "MongoDB"
This creates a service called MongoDB and looks at the system service, which indicates that a success has been created:
After that, you can start MongoDB by starting the service.
Installing MongoDB under Windows