How to install Mongo Db server in windows server

    Posted in Windows Servers on Feb 13, 2020

    windows-dedicated-server-hosting.jpg

    First, download the mongo database MSI installer:

    https://www.cloudtechtiq.com/storage/app/media/mongodb-win32-x86_64-2008plus-3.4.24-signed.msi

    After download the msi installer, double click on it:

    rrr1.png

    Accept the user license agreement:

    rrr2.png

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

    rrr3.png

    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.
    
    systemLog:
    destination: file
    path: c:\data\log
    
    #where to write  data.
    storage:
    dbPath: c:\data\db
    
    #network interfaces
    net:
    port: 35615
    bindIp: 127.0.0.1,103.x.x.x
    
    #processManagement:
    
    security:
    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

      Services Cloudtechtiq offers: