How To : Install mongodb in Windows Server 2016

  Software

https://www.mongodb.com/download-center
> Community Server

However, there’s no response to install .msi file

run command prompt as administrator :

msiexec.exe /q /i D:\mongodb-win32-x86_64-2008plus-ssl-3.6.6-signed.msi SHOULD_INSTALL_COMPASS="0"

cd C:\Program Files\MongoDB\Server\3.6\bin
mongod.exe –dbpath D:\mongodb\data

create mongod.cfg file in C:\Program Files\MongoDB\Server\3.6\bin

dbpath=D:\mongodb\data\db
logpath=D:\mongodb\data\log\mongod.log

error

C:\Program Files\MongoDB\Server\3.6\bin>net start mongodb
The MongoDB service is starting.
The MongoDB service could not be started.

A service specific error occurred: 100.

More help is available by typing NET HELPMSG 3547.


C:\Program Files\MongoDB\Server\3.6\bin>taskkill /F /IM mongod.exe

C:\Program Files\MongoDB\Server\3.6\bin>mongod.exe --logpath D:\mongodb\data\log\mongodb.log --logappend --dbpath D:\mongodb\data --directoryperdb --serviceName MongoDB --remove

C:\Program Files\MongoDB\Server\3.6\bin>mongod --logpath "D:\mongodb\logs\mongodb.log" --logappend --dbpath "D:\mongodb\data" --directoryperdb --serviceName "MongoDB" --serviceDisplayName "MongoDB" --install

go to services.msc > MongoDB > Start