First you need to download the MONGO installation package
Cmd.exe this needs to be opened with administrator privileges
Enter the installation directory to the MONGO
First, create a Data folder manually according to the following command to the C drive
Create a DB folder in data a log folder
Mongod represents the command to execute MONGO
-dbpath represents the creation of a database file
-logpath to create a log file
-install-servicename represents the name of the service that was created
"" is the file and log files of the database
When creating the database file and creating the log file, if there is no folder C in the specified path, the error will be made, so you need to manually create these folders and then execute the following command
Mongod-dbpath "C:\MongoDB\Data\db"-logpath "C:\MongoDB\Data\log\MongoDB.log"-install-servicename "MongoDB"
And then execute this command.
So this MONGO service is created.
Create a MONGO service under Windows