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.
We gather Telemetry data to understand the use of the software and improve our products.
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 mongosh shell, import/export tools, other client utilities, server software, default configuration, and init.d scripts. |
percona-server-mongodb-server |
The mongod server, default configuration files, and init.d scripts |
percona-server-mongodb-shell |
The mongosh 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¶
Before you start, check the system requirements.
Configure Percona repository¶
Percona provides the percona-release configuration tool that simplifies operating repositories and enables to install and update both Percona Server for MongoDB packages and required dependencies smoothly.
-
Fetch
percona-releasepackages from Percona web:wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb -
Install the downloaded package with dpkg:
sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.debAfter 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.listfile. -
Enable the repository:
sudo percona-release enable psmdb-90 release -
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:
-
List available versions:
sudo apt-cache madison percona-server-mongodbSample output:
percona-server-mongodb | 9.0.8-1.bullseye | http://repo.percona.com/psmdb-90/apt bullseye/main amd64 Packages -
Install a specific version packages. You must specify each package with the version number. For example, to install Percona Server for MongoDB 9.0.8-1, run the following command:
sudo apt install percona-server-mongodb=9.0.8-1.bullseye percona-server-mongodb-mongos=9.0.8-1.bullseye percona-server-mongodb-shell=9.0.8-1.bullseye percona-server-mongodb-server=9.0.8-1.bullseye percona-server-mongodb-tools=9.0.8-1.bullseye
By default, Percona Server for MongoDB stores data files in /var/lib/mongodb/
and configuration parameters in /etc/mongod.conf.
Enable Transparent Hugepages (THP)¶
Enable Transparent Hugepages (THP) before you start Percona Server for MongoDB 9.0. TCMalloc requires THP on supported Linux architectures. See Enable Transparent Hugepages (THP).
Run Percona Server for MongoDB¶
Start 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
Confirm that the service is running
Check the service status using the following command:
sudo systemctl status mongod
Stop the service
Stop the service using the following command:
sudo systemctl stop mongod
Restart the service
Restart the service using the following command:
sudo systemctl restart mongod
Congratulations! Your Percona Server for MongoDB is up and running.
Install mongosh testing packages on Ubuntu 26.04¶
MongoDB Shell (mongosh) 2.14.1 testing packages are available for Ubuntu 26.04 LTS (Resolute Raccoon). Download the packages from the Percona Server for MongoDB 9.0 testing repository.
Warning
These packages are for testing only and don’t mean that Ubuntu 26.04 is supported in production. To see which platforms Percona supports, check the Percona Software and Platform Lifecycle.
Select the percona-mongodb-mongosh package that matches your system architecture:
| Architecture | Package |
|---|---|
| AMD64 (x86_64) | percona-mongodb-mongosh_2.14.1.resolute_amd64.deb |
| ARM64 (AArch64) | percona-mongodb-mongosh_2.14.1.resolute_arm64.deb |
To install the package:
-
Not sure which package fits your system? Check your architecture:
dpkg --print-architectureThe command returns
amd64orarm64. -
Download and install the package. The following commands pick the right file for your architecture automatically:
wget https://repo.percona.com/psmdb-90/apt/pool/testing/p/percona-mongodb-mongosh/percona-mongodb-mongosh_2.14.1.resolute_$(dpkg --print-architecture).deb sudo apt install ./percona-mongodb-mongosh_2.14.1.resolute_$(dpkg --print-architecture).deb -
Confirm the installation:
mongosh --version