Skip to content
logo
Percona Server for MongoDB 4.2
Install Percona Server for MongoDB on Debian and Ubuntu
Initializing search
    percona/psmdb-docs
    percona/psmdb-docs
    • Home
    • Percona Server for MongoDB feature comparison
      • Overview
      • Install Percona Server for MongoDB on Debian and Ubuntu
        • Package Contents
        • Procedure
          • Configure Percona repository
          • Install Percona Server for MongoDB
        • Run Percona Server for MongoDB
      • Install Percona Server for MongoDB on Red Hat Enterprise Linux and derivatives
      • Install Percona Server for MongoDB from binary tarball
      • Run Percona Server for MongoDB in a Docker container
        • Percona Memory Engine
        • Hot Backup
        • $backupCursor and $backupCursorExtend aggregation stages
        • Authentication
        • Enable authentication
        • Set up LDAP authentication with SASL
        • Set up x.509 authentication and LDAP authorization
        • Setting up Kerberos 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
        • Migrate from key file encryption to HashiCorp Vault encryption
      • Auditing
      • Profiling rate limit
      • Log redaction
      • Additional text search algorithm - ngram
      • Tune parameters
        • Upgrade from 4.0 to 4.2
        • Upgrade Percona Server for MongoDB
      • Uninstall Percona Server for MongoDB
      • Release notes index
      • Percona Server for MongoDB 4.2.24-24 (2023-03-09)
      • Percona Server for MongoDB 4.2.23-23 (2022-11-08)
      • Percona Server for MongoDB 4.2.22-22 (2022-09-06)
      • Percona Server for MongoDB 4.2.21-21 (2022-06-29)
      • Percona Server for MongoDB 4.2.20-20 (2022-05-23)
      • Percona Server for MongoDB 4.2.19-19 (2022-03-29)
      • Percona Server for MongoDB 4.2.18-18 (2022-01-19)
      • Percona Server for MongoDB 4.2.17-17 (2021-10-11)
      • Percona Server for MongoDB 4.2.15-16 (2021-07-26)
      • Percona Server for MongoDB 4.2.14-15 (2021-05-13)
      • Percona Server for MongoDB 4.2.13-14 (2021-04-01)
      • Percona Server for MongoDB 4.2.12-13 (2021-02-03)
      • Percona Server for MongoDB 4.2.11-12 (2020-12-07)
      • Percona Server for MongoDB 4.2.10-11 (2020-11-02)
      • Percona Server for MongoDB 4.2.9-10 (2020-10-09)
      • Percona Server for MongoDB 4.2.9-9 (2020-09-03)
      • Percona Server for MongoDB 4.2.8-8 (2020-07-07)
      • Percona Server for MongoDB 4.2.7-7 (2020-06-04)
      • Percona Server for MongoDB 4.2.6-6 (2020-05-07)
      • Percona Server for MongoDB 4.2.5-5 (2020-04-02)
      • Percona Server for MongoDB 4.2.3-4 (2020-02-20)
      • Percona Server for MongoDB 4.2.2-3 (2019-12-24)
      • Percona Server for MongoDB 4.2.1-1 (2019-11-13)
      • Percona Server for MongoDB 4.2.0-1 (2019-09-09)
    • Glossary
      • Copyright and Licensing Information
      • Trademark Policy

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

    Install Percona Server for MongoDB on Debian and Ubuntu¶

    This document describes how to install Percona Server for MongoDB from Percona repositories on DEB-based distributions such as Debian and Ubuntu.

    Note

    Percona Server for MongoDB should work on other DEB-based distributions, 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¶

    Configure Percona repository¶

    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.

    1. Fetch percona-release packages from Percona web:

      $ wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
      
    2. Install the downloaded package with dpkg:

      $ sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb
      

      After you install this package, you have the access to Percona repositories. You can check the repository setup in the /etc/apt/sources.list.d/percona-release.list file.

    3. Enable the repository:

      $ sudo percona-release enable psmdb-42 release
      
    4. Remember to update the local cache:

      $ sudo apt update
      

    Install Percona Server for MongoDB¶

    Run the following command to install the latest version of Percona Server for MongoDB:

    $ sudo apt install percona-server-mongodb
    

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

    1. List available versions:

      $ sudo apt-cache madison percona-server-mongodb
      

      Sample output:

      percona-server-mongodb | 4.2.9-9.buster | http://repo.percona.com/psmdb-42/apt buster/main amd64 Packages
      percona-server-mongodb | 4.2.8-8.buster | http://repo.percona.com/psmdb-42/apt buster/main amd64 Packages
      percona-server-mongodb | 4.2.7-7.buster | http://repo.percona.com/psmdb-42/apt buster/main amd64 Packages
      percona-server-mongodb | 4.2.6-6.buster | http://repo.percona.com/psmdb-42/apt buster/main amd64 Packages
      percona-server-mongodb | 4.2.5-5.buster | http://repo.percona.com/psmdb-42/apt buster/main amd64 Packagess
      
    2. Install a specific version packages. You must specify each package with the version number. For example, to install Percona Server for MongoDB 4.2.5-5, run the following command:

      $ sudo apt install percona-server-mongodb=4.2.5-5.buster percona-server-mongodb-mongos=4.2.5-5.buster percona-server-mongodb-shell=4.2.5-5.buster percona-server-mongodb-server=4.2.5-5.buster percona-server-mongodb-tools=4.2.5-5.buster
      

    Run Percona Server for MongoDB¶

    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 started automatically after installation unless it encounters errors during the installation process.

    You can also manually start it using the following command:

    $ sudo systemctl start mongod
    

    Confirming that the service is running

    Check the service status using the following command:

    $ sudo systemctl status mongod
    

    Stopping the service

    Stop the service using the following command:

    $ sudo systemctl stop mongod
    

    Restarting the service

    Restart the service using the following command:

    $ sudo systemctl restart 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.