Skip to content

Install Percona Distribution for MongoDB

We recommend to install Percona Distribution for MongoDB from Percona repositories using the package manager of your operating system. Find the list of supported Linux distributions on the Percona Software and Platform Lifecycle page.

Alternatively, you can download Percona Distribution for MongoDB from Percona website and install it manually from binary tarballs.

Choose how you wish to install Percona Distribution for MongoDB:

Run the following commands as root or by using the sudo command.

  1. Install percona-release

    Install the percona-release repository management tool to subscribe to Percona repositories:

    • Install curl
    $ sudo apt update
    $ sudo apt install curl
    
    • Download the percona-release package
    $ curl -O https://repo.percona.com/apt/percona-release_latest.generic_all.deb
    
    • Install the package and dependancies
    $ sudo apt install gnupg2 lsb-release ./percona-release_latest.generic_all.deb
    
    • Refresh the local cache
    $ supo apt update
    
  2. Enable the repository

    Percona provides two repositories for Percona Distribution for MongoDB. To enable a repo, we recommend using the setup command:

    $ sudo percona-release setup pdmdb-4.4
    
  3. Install Percona Distribution for MongoDB packages

    $ sudo apt install percona-server-mongodb percona-backup-mongodb
    

Run the following commands as root or by using the sudo command.

  1. Install percona-release

    Install the percona-release repository management tool to subscribe to Percona repositories:

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

    Percona provides two repositories for Percona Distribution for MongoDB. To enable a repo, we recommend using the setup command:

    $ sudo percona-release setup pdmdb-4.4
    
  3. Install Percona Distribution for MongoDB packages

    $ sudo yum install percona-server-mongodb percona-backup-mongodb
    

You can find binary tarballs on the Percona software downloads page

  1. Select Generic Linux from the dropdown.

  2. Download binary tarballs. Replace the <version> variable with the desired version:

    $ wget https://downloads.percona.com/downloads/percona-distribution-mongodb-4.4/percona-distribution-mongodb-<version>/binary/tarball/percona-backup-mongodb-<version>-x86_64.tar.gz
    $ wget https://downloads.percona.com/downloads/percona-distribution-mongodb-4.4/percona-distribution-mongodb-<version>/binary/tarball/percona-server-mongodb-<version>-x86_64.glibc2.17.tar.gz
    
  3. Extract the tarballs

    $ tar -xf percona-backup-mongodb-<version>-x86_64.tar.gz
    $ tar -xf percona-server-mongodb-<version>-x86_64.glibc2.17.tar.gz
    
  4. Export the location of the binaries to the PATH variable

    For example, if you’ve extracted the tarballs to your home directory, the commands would be the following:

    $ export PATH=~/percona-backup-mongodb-<version>/:~/percona-server-mongodb-<version>/:$PATH
    
  5. Create the default data directory for Percona Server for MongoDB:

    $ sudo mkdir -p /data/db
    
  6. Check that you have read and write permissions for the data directory and run mongod.

Deploy and run Percona Distribution for MongoDB on Kubernetes with Percona Operator for MongoDB. See Quickstart guides for the installation instructions on your favorite Kubernetes flavor.

To set up monitoring of your Percona Distribution for MongoDB in PMM, see Set up PMM to monitor MongoDB

Uninstall Percona Distribution for MongoDB

To uninstall Percona Distribution for MongoDB, remove the packages using the package manager of your operation system. Optionally, disable Percona repository.

Get expert help

If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services.


Last update: April 3, 2023
Created: December 9, 2022