Install MongoDB Enterprise Edition

This procedure covers how to enable your repository for MongoDB and install the MongoDB Enterprise Edition.

  1. Configure the repository by creating a /etc/yum.repos.d/mongodb-enterprise-8.2.repo file:
    [mongodb-enterprise-8.2]
    name=MongoDB Enterprise Repository
    baseurl=https://repo.mongodb.com/yum/redhat/9/mongodb-enterprise/8.2/$basearch/
    gpgcheck=1
    enabled=1
    gpgkey=https://pgp.mongodb.com/server-8.0.asc
    Download the latest version of the file from: Install MongoDB Enterprise Edition(MongoDB documentation)
  2. Download MongoDB shell (mongosh) from https://www.mongodb.com/try/download/shell
  3. Select the latest version and RHEL/CentOS(7+)s390x from the Platform pull-down menu.
  4. Click Copy link and run the wget or curl command:
    wget https://downloads.mongodb.com/compass/mongodb-mongosh-2.5.9.s390x.rpm
  5. Install the database by running the following command:
    $ sudo yum install mongodb-enterprise-database
  6. Install the required tools by running the following command:
    $ sudo yum install mongodb-enterprise-tools
  7. Start the mongod process by running the following command:
    sudo systemctl start mongod
    
  8. Optional: Configure MongoDB ports for external access. This configuration is mainly for testing environments and to verify the connections.
    1. Change the IP address in /etc/mongod.conf from 127.0.0.1 to 0.0.0.0
    2. Restart the mongod process by running the following command:
      sudo systemctl restart mongod
      Note: When you use NMState, the port is externally accessible automatically. When you use MetalLB, you must define a separate service as described in Configure the network services