![]() After some finagling, the below code worked for me as well: sc.exe create MongoDB binPath= "\"C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe\" -service -config=\"C:\Program Files\MongoDB\Server\3.6\mongod.cfg\"" DisplayName= "MongoDB" start= "auto" The command listed in the documentation didn’t work for me, either. If you’ve completed everything up to this point, you’re ready to create a Windows service. This file should contain the following: systemLog: Next, create a mongod.cfg file and place it in C:\Program Files\MongoDB\Server\3.6\. Create two directories using the command below: md "\data\db" "\data\log" Without this, the installer would get halfway through, fail, and then rollback all changes.īefore moving on to install the Windows Service, you’ll need to complete a couple preliminary steps. The key here was the SHOULD_INSTALL_COMPASS="0" snippet. ![]() Keep in mind that these commands work best using the standard cmd shell, and not Powershell.Īfter downloading MongoDB, place the msi installer on the root C: drive, and then run the following: msiexec.exe /q /i C:\mongodb-win32-x86_64-2008plus-ssl-3.6.5-signed.msi SHOULD_INSTALL_COMPASS="0" Although the Mongo documentation is thorough, the exact commands listed didn’t work for me out of the box. I had a hell of a time trying to figure out how to install MongoDB silently via the command line in Windows server.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |