Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Dell Wyse Management Suite Version 1.3 High Availability Guide

Edit mongod.cfg file

You must edit the mongod.cfg file to enable the security for the MongoDB database.

  1. Login to MongoDB as root user that you have already created and run the following command:
    mongo -uroot -pAdmin#123 admin
  2. Go to \data\bin\mongod.cfg directory, and open mongod.cfg file in a text editor.

  3. Edit mongod.cfg file as shown in the following command:

    Figure 1. Edit mongod.cfgediting cfg file
    systemLog:
                                        destination: file
                                        path: c:\data\log\mongod.log
                                        storage:
                                        dbPath: c:\data\db\Mongo
                                        net:
                                        port: 27017
                                        security:
                                        authorization: enabled
                                     
    • NOTE: The port numbers will change depending on the system at the work place.
  4. Save mongod.cfg and exit.

Initiate replication on the servers

Ensure that you disable firewall on Windows and stop Tomcat servers if they are running.

  1. Login to MongoDB as root user that you have already created and run the following command:
    mongo -uroot -pAdmin#123 admin
  2. Go to \data\bin\mongod.cfg directory, and open mongod.cfg file in a text editor.

  3. Add the following three lines in the mongod.cfg file:

    keyFile: c:\data\log\mongod.key.txt

    replication:

    replSetName: wms

    Figure 2. Enabling securitysecurity
  4. Create mongod.key.txt file and copy on all the three servers.

    Figure 3. Copy the mongod key filecopy the file
  5. After you copy the file, stop the mongod service by running the following command:

    net stop mongodb

  6. Initiate replication on the primary node of the MongoDB cluster logging in using DBadmin user and then run the following command:

    rs.initiate();

  7. Check the replication status by running the following command:

    rs.status();

    Figure 4. Replication statusreplication status
  8. Start mongod service and add the secondary nodes to the second and third nodes in the MongoDB cluster:

    rs.add("IPAddress2:27017")

    rs.add("IPAddress3:27017")

    • NOTE: The port numbers will differ based on the systems at your network and systems.
  9. After you add the nodes in the MongoDB cluster, check the replication status by running the following commands for the primary and secondary nodes:

    rs.status();

    Figure 5. Status in primary serverprimary server status
    Figure 6. Secondary server statusSecondary server status

Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\