Skip to content
logo
Percona Server for MongoDB 5.0
Installing Percona Server for MongoDB on Red Hat Enterprise Linux and CentOS
Initializing search
    percona/psmdb-docs
    percona/psmdb-docs
    • Home
    • Percona Server for MongoDB feature comparison
      • Overview
      • Installing Percona Server for MongoDB on Debian and Ubuntu
      • Installing Percona Server for MongoDB on Red Hat Enterprise Linux and CentOS
        • Package Contents
        • Procedure
          • Configure Percona repository
          • Install Percona Server for MongoDB packages
        • Run Percona Server for MongoDB
          • Run after reboot
      • Installing Percona Server for MongoDB from binary tarball
      • Running Percona Server for MongoDB in a Docker Container
        • Percona Memory Engine
        • Hot Backup
        • $backupCursor and $backupCursorExtend aggregation stages
        • Authentication overview
        • Enable SCRAM authentication
        • Set up LDAP authentication with SASL
        • Set up x.509 authentication and LDAP authorization
        • Set up Kerberos authentication
        • AWS IAM authentication
        • Setting up AWS IAM authentication
        • LDAP authorization
        • Set up LDAP authentication and authorization using NativeLDAP
        • Data at rest encryption
        • HashiCorp Vault integration
        • Using the Key Management Interoperability Protocol (KMIP)
        • Local key management using a keyfile
        • Migrating from key file encryption to HashiCorp Vault encryption
      • Auditing
      • Profiling Rate Limit
      • Log Redaction
      • Additional text search algorithm - ngram
      • Tune parameters
        • Upgrade from 4.4 to 5.0
        • Upgrading Percona Server for MongoDB
      • Uninstall Percona Server for MongoDB
      • Percona Server for MongoDB 5.0 Release Notes
      • Percona Server for MongoDB 5.0.15-13 (2023-03-16)
      • Percona Server for MongoDB 5.0.14-12 (2022-12-08)
      • Percona Server for MongoDB 5.0.13-11 (2022-10-12)
      • Percona Server for MongoDB 5.0.11-10 (2022-09-01)
      • Percona Server for MongoDB 5.0.10-9 (2022-08-09)
      • Percona Server for MongoDB 5.0.9-8 (2022-06-20)
      • Percona Server for MongoDB 5.0.8-7 (2022-05-10)
      • Percona Server for MongoDB 5.0.7-6 (2022-04-20)
      • Percona Server for MongoDB 5.0.6-5 (2022-02-10)
      • Percona Server for MongoDB 5.0.5-4 (2021-12-28)
      • Percona Server for MongoDB 5.0.4-3 (Release Candidate) (2021-12-08)
      • Percona Server for MongoDB 5.0.3-2 (Release Candidate) (2021-10-14)
      • Percona Server for MongoDB 5.0.2-1 (Release Candidate) (2021-08-16)
    • Glossary
    • Copyright and licensing information
    • Trademark policy

    • Package Contents
    • Procedure
      • Configure Percona repository
      • Install Percona Server for MongoDB packages
    • Run Percona Server for MongoDB
      • Run after reboot

    Installing Percona Server for MongoDB on Red Hat Enterprise Linux and CentOS¶

    This document describes how to install Percona Server for MongoDB on RPM-based distributions such as Red Hat Enterprise Linux and compatible derivatives.

    Note

    Percona Server for MongoDB should work on other RPM-based distributions (for example, Amazon Linux AMI and Oracle Linux), but it is tested only on platforms listed on the Percona Software and Platform Lifecycle page.

    Package Contents¶

    Package Contains
    percona-server-mongodb The mongo shell, import/export tools, other client
    utilities, server software, default configuration, and init.d scripts.
    percona-server-mongodb-server The mongodserver, default configuration files, andinit.d` scripts
    percona-server-mongodb-shell The mongo shell
    percona-server-mongodb-mongos The mongos sharded cluster query router
    percona-server-mongodb-tools Mongo tools for high-performance MongoDB fork from Percona
    percona-server-mongodb-dbg Debug symbols for the server

    Procedure¶

    Percona provides the percona-release configuration tool that simplifies operating repositories and enables to install and update both Percona Backup for MongoDB packages and required dependencies smoothly.

    Configure Percona repository¶

    1. Install percona-release:

      $ sudo yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
      
    2. Enable the repository:

      $ sudo percona-release enable psmdb-50 release
      

    Install Percona Server for MongoDB packages¶

    To install the latest version of Percona Server for MongoDB, use the following command:

    $ sudo yum install percona-server-mongodb
    

    To install a specific version of Percona Server for MongoDB, do the following:

    1. List available versions:

      $ sudo yum list percona-server-mongodb --showduplicates
      

      Sample output:

      Available Packages
      percona-server-mongodb.x86_64   5.0.2-1.el8   psmdb-50-release-x86_64
      percona-server-mongodb.x86_64   5.0.3-2.el8   psmdb-50-release-x86_64
      percona-server-mongodb.x86_64   5.0.4-3.el8   psmdb-50-release-x86_64
      percona-server-mongodb.x86_64   5.0.5-4.el8   psmdb-50-release-x86_64
      percona-server-mongodb.x86_64   5.0.6-5.el8   psmdb-50-release-x86_64
      percona-server-mongodb.x86_64   5.0.7-6.el8   psmdb-50-release-x86_64
      percona-server-mongodb.x86_64   5.0.8-7.el8   psmdb-50-release-x86_64
      percona-server-mongodb.x86_64   5.0.9-8.el8   psmdb-50-release-x86_64
      percona-server-mongodb.x86_64   5.0.10-9.el8  psmdb-50-release-x86_64
      percona-server-mongodb.x86_64   5.0.11-10.el8 psmdb-50-release-x86_64
      percona-server-mongodb.x86_64   5.0.13-11.el8 psmdb-50-release-x86_64
      
    2. Install a specific version packages. For example, to install Percona Server for MongoDB 5.0.13-11, run the following command:

      $ sudo yum install percona-server-mongodb-5.0.13-11.el8
      

    Run Percona Server for MongoDB¶

    Note

    If you use SELinux in enforcing mode, you must customize your SELinux user policies to allow access to certain /sys and /proc files for OS-level statistics. Also, you must customize directory and port access policies if you are using non-default locations.

    Please refer to Configure SELinux section of MongoDB Documentation for policy configuration guidelines.

    By default, Percona Server for MongoDB stores data files in /var/lib/mongodb/ and configuration parameters in /etc/mongod.conf.

    Starting the service

    Percona Server for MongoDB is not started automatically after installation. Start it manually using the following command:

    $ sudo systemctl start mongod
    

    Confirming that service is running

    Check the service status using the following command: service mongod status

    $ sudo systemctl status mongod
    

    Stopping the service

    Stop the service using the following command: service mongod stop

    $ sudo systemctl stop mongod
    

    Restarting the service

    Restart the service using the following command: service mongod restart

    $ sudo systemctl restart mongod
    

    Run after reboot¶

    The mongod service is not automatically started after you reboot the system.

    For RHEL or CentOS versions 5 and 6, you can use the chkconfig utility to enable auto-start as follows:

    $ sudo chkconfig --add mongod
    

    For RHEL or CentOS version 7, you can use the systemctl utility:

    $ sudo systemctl enable mongod
    

    Contact Us

    For free technical help, visit the Percona Community Forum.

    To report bugs or submit feature requests, open a JIRA ticket.

    For paid support and managed or consulting services , contact Percona Sales.


    Last update: January 31, 2023
    Created: December 8, 2022
    Percona LLC and/or its affiliates, © 2023
    Made with Material for MkDocs

    Cookie consent

    We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better.