MongoDB https://www.mongodb.org/
Download the Windows version of MongoDB on the MongoDB website (for example, extract to D disk)
Create the Data folder under the extracted MongoDB folder and create a log and DB two folders under the Data folder
Create an empty Mongodb.log file under the log folder
Then create the Mongo.config file under the MongoDB folder
Add the following two lines of content to the Mongo.config file
Dbpath=d:\mongodb\data MongoDB Data folder
Logpath=d:\mongodb\data\log\mongodb.log MongoDB Log Record file
Then add MongoDB to the window service
@echo off
@echo---------------------Welcome to use Mongod Auto Run Tools--------------
@echo. & Pause
@echo---------------------is shutting down the redundancy process, SAO, etc.----------------------------
Taskkill/im mongod.exe/f
@echo--------------------The redundancy process is complete, the server is starting, Sao etc-------------
Start D:\mongodb\bin\mongod.exe--install--logpath=d:\mongodb\data\log\mongodb.log--dbpath=d:\mongodb\data
@echo. & Pause
Copy the above content to a bat file, and then run the bat file to join the MongoDB service in Windows
The MongoDB service is then started in the service, and after the installation is successful, enter http://localhost:27017/as indicated by the installation success.
Uninstalling the MongoDB service
@echo off
@echo---------------------Welcome to use Mongod Remove tools--------------
@echo. & Pause
@echo---------------------is shutting down the redundancy process, SAO, etc.----------------------------
Taskkill/im mongod.exe/f
@echo--------------------The redundancy process is complete, the server is starting, Sao etc-------------
Start D:\mongodb\bin\mongod.exe--remove--servicename "MongoDB"--logpath=d:\mongodb\data\log\mongodb.log--dbpath= D:\mongodb\data
@echo. & Pause
Copy the above content and save it to a bat file to run the file to uninstall the MongoDB service
net start "MongoDB" Start MongoDB service
net stop "MongoDB" Stop MongoDB Service
Installing MongoDB in the Windows environment