How to install Mongo Db server in windows server

    Posted in Windows Servers on Feb 13, 2020

    First, download the mongo database MSI installer:

    After download the msi installer, double click on it:


    Accept the user license agreement:


    Ready to install mongo ddb 3.4 with complete setup click on install now:


    To access mongo via GUI you can install the MongoDB Compass Community on server.

    You can create the custom configuration file while using the following methods:

    1. Create the data and log Directories via cmd method.

       mkdir c:\data\db
       mkdir c:\data\log
    2. Create the configuration file for example :

    C:\Program Files\MongoDB\Server\3.4\mongod.cfg

    In the file specified the data path and custom port

    #Where to write logging data.
    destination: file
    path: c:\data\log
    #where to write  data.
    dbPath: c:\data\db
    #network interfaces
    port: 35615
    authorization: "enabled"
    1. Create the MongoDB Service as per following command on CMD:

      sc.exe create MongoDB binPath= "\"C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe\" --service --config=\"C:\Program Files\MongoDB\Server\3.4\mongod.cfg\"" DisplayName= "MongoDB" start= "auto"
    2. Start the mongo service :

      CMD > net start MongoDB