Get MongoDB
Visit Https://www.mongodb.com/download-center, download the latest version of MongoDB and follow the instructions to install one step at a
Configure MongoDB to create a profile as a Windows service startup
Need to create a profile, the configuration file must be set to the path of the Systemlog.path system log
For example, create a configuration file in C:\Program files\mongodb\server\3.6\mongod.cfg, set Systemlog.path and Storage.dbpath:
systemLog: destination: file path: c:\data\log\mongod.logstorage: dbPath: c:\data\db
Install as a Windows service
Install the MongoDB service by starting Mongod.exe with the--install option and the-config option to specify the Previou Sly created configuration file.
The Setup MongoDB service installs with the specified profile using the "Mongod.exe" and "--install" options and the "--config" option.
For example:
"C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe" --config "C:\Program Files\MongoDB\Server\3.6\mongod.cfg" --install
If necessary, you can also install multiple instances Mongod.exe or Mongos.exe, but for each service a unique name,--servicename and--servicedisplayname.
Start MongoDB Service
net start MongoDB
Verify that the service started successfully
Open the log file under the configuration path just now, if you see the following words so successful!
[initandlisten] waiting for connections on port 27017
Link MongoDB
Via Mongo.exe shell link
"C:\Program Files\MongoDB\Server\3.6\bin\mongo.exe"
Stop it
net stop MongoDB
Delete
"C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe" --remove
MongoDB Installation and Configuration