This documentation is for the end of life version of Percona Server for MongoDB and is no longer supported. You may want to see the current documentation.
Installing Percona Server for MongoDB on Red Hat Enterprise Linux and CentOS¶
Use this document to install Percona Server for MongoDB on RPM-based distributions from Percona repositories.
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. 1
Package Contents¶
Package |
Contains |
percona-server-mongodb |
The |
percona-server-mongodb-server |
The mongod server, default configuration files, and |
percona-server-mongodb-shell |
The |
percona-server-mongodb-mongos |
The |
percona-server-mongodb-tools |
Mongo tools for high-performance MongoDB fork from Percona |
percona-server-mongodb-dbg |
Debug symbols for the server |
Installing from Percona repositories¶
The preferred way to install Percona Server for MongoDB is from Percona repositories. Percona repositories are managed using the percona-release tool.
Configure Percona repository¶
Install percona-release:
$ sudo yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
Example of Output
Retrieving https://repo.percona.com/yum/percona-release-latest.noarch.rpm Preparing... ########################################### [100%] 1:percona-release ########################################### [100%]
Enable the repository:
..code-block:: bash
$ sudo percona-release enable psmdb-40 release
See also
- More information about how to use the
percona-release
tool
Install the latest version¶
To install the latest version of Percona Server for MongoDB, use the following command:
$ sudo yum install percona-server-mongodb
Install a specific version¶
To install a specific version of Percona Server for MongoDB, do the following:
List available versions:
$ sudo yum list percona-server-mongodb --showduplicates
Sample Output
Available Packages percona-server-mongodb.x86_64 4.0.9-4.el8 psmdb-40-release-x86_64 percona-server-mongodb.x86_64 4.0.9-5.el8 psmdb-40-release-x86_64 percona-server-mongodb.x86_64 4.0.10-5.el8 psmdb-40-release-x86_64 percona-server-mongodb.x86_64 4.0.12-6.el8 psmdb-40-release-x86_64 percona-server-mongodb.x86_64 4.0.13-7.el8 psmdb-40-release-x86_64 percona-server-mongodb.x86_64 4.0.14-8.el8 psmdb-40-release-x86_64 percona-server-mongodb.x86_64 4.0.16-9.el8 psmdb-40-release-x86_64 percona-server-mongodb.x86_64 4.0.17-10.el8 psmdb-40-release-x86_64 percona-server-mongodb.x86_64 4.0.18-11.el8 psmdb-40-release-x86_64 percona-server-mongodb.x86_64 4.0.19-12.el8 psmdb-40-release-x86_64 percona-server-mongodb.x86_64 4.0.20-13.el8 psmdb-40-release-x86_64
Install a specific version packages. For example, to install Percona Server for MongoDB 4.0.13-7, run the following command:
$ sudo yum install percona-server-mongodb-4.0.13-7.el8
Running Percona Server for MongoDB¶
Warning
If you have SELinux security module installed, it will conflict with Percona Server for MongoDB. There are several options to deal with this:
Remove the SELinux packages. This is not recommended, because it may violate security.
Disable SELinux by setting
SELINUX
in/etc/selinux/config
todisabled
. This change takes effect after you reboot.Run SELinux in permissive mode by setting
SELINUX
in/etc/selinux/config
topermissive
. This change takes effect after you reboot.You can also enforce permissive mode at runtime using the
setenforce 0
command. However, this will not affect the configuration after a reboot.
Percona Server for MongoDB stores data files in /var/lib/mongodb/
by default.
The configuration file is /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
Running 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
Footnotes
- 1
We support only the current stable RHEL 6 and CentOS 6 releases, because there is no official (i.e. RedHat provided) method to support or download the latest OpenSSL on RHEL and CentOS versions prior to 6.5. Similarly, and also as a result thereof, there is no official Percona way to support the latest Percona Server builds on RHEL and CentOS versions prior to 6.5. Additionally, many users will need to upgrade to OpenSSL 1.0.1g or later (due to the Heartbleed vulnerability), and this OpenSSL version is not available for download from any official RHEL and CentOS repositories for versions 6.4 and prior. For any officially unsupported system,
src.rpm
packages can be used to rebuild Percona Server for any environment. Please contact our support service if you require further information on this.