Step 3: Create a configuration file. Step 4: Create the MongoDB service. Step 5: Start the MongoDB service. Step 6: Stop or remove the MongoDB service as needed. Additional Resources $^{12}$https://university.mongodb.com/courses/M101P/about?jmp=docs $^{13}$https://university.mongodb.com/courses/M101N/about?jmp=docs $^{14}$https://www.mongodb.com/lp/white-paper/architecture-guide?jmp=docs Chapter 2. Install MongoDB 32 • MongoDB for Developers Free Course 12 • MongoDB for .NET Developers Free Online Course 13 • MongoDB Architecture Guide 14 To stop the MongoDB service, use the following command: net stop MongoDB To remove the MongoDB service, first stop the service and then run the following command: sc.exe delete MongoDB net start MongoDB [SC] CreateService SUCCESS If successfully created, the following log message will display: sc.exe requires a space between “=” and the configuration values (eg “binPath= ”), and a “\” to escape double quotes. sc.exe create MongoDB binPath= "C:\mongodb\bin\mongod.exe --service Create the MongoDB service. echo logpath=c:\data\log\mongod.log> "C:\mongodb\mongod.cfg" echo dbpath=c:\data\db>> "C:\mongodb\mongod.cfg" The following creates a configuration file, specifying both the logpath and the dbpath settings in the configuration file: Create a configuration file . This file can include any of the configuration options for mongod , but must include a valid setting for logpath : MongoDB Documentation, Release 3.0.4