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.
-
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
- Install
-
Enable the repository
Percona provides two repositories for Percona Distribution for MongoDB. To enable a repository, we recommend using the
setup
command:$ sudo percona-release setup pdmdb-4.2
-
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.
-
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
-
Enable the repository
Percona provides two repositories for Percona Distribution for MongoDB. To enable a repository, we recommend using the
setup
command:$ sudo percona-release setup pdmdb-4.2
-
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
-
Select Generic Linux from the dropdown.
-
Download binary tarballs. Replace the <version> variable with the desired version:
$ wget https://downloads.percona.com/downloads/percona-distribution-mongodb-4.2/percona-distribution-mongodb-<version>/binary/tarball/percona-backup-mongodb-<version>-x86_64.tar.gz $ wget https://downloads.percona.com/downloads/percona-distribution-mongodb-4.2/percona-distribution-mongodb-<version>/binary/tarball/percona-server-mongodb-<version>-x86_64.glibc2.17.tar.gz
-
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
-
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
-
Create the default data directory for Percona Server for MongoDB:
$ sudo mkdir -p /data/db
-
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, stop the service and remove the packages using the package manager of your operation system. Optionally, disable Percona repository.
Created: December 9, 2022