Installing Percona Server for MongoDB on Red Hat Enterprise Linux and CentOS¶
.rpm packages for 64-bit versions
of the following distributions:
- Red Hat Enterprise Linux / CentOS 5
- Red Hat Enterprise Linux / CentOS 6 
- Red Hat Enterprise Linux / CentOS 7
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 above.
|Contains Mongo tools for high-performance MongoDB fork from Percona.|
|Contains debug symbols for the server.|
It is recommended to intall Percona Server for MongoDB from official Percona repositories:
Configure Percona repositories as described in Percona Software Repositories Documentation.
Install the required Percona Server for MongoDB package using
yum. For example, to install the full package, run the following:
$ sudo yum install Percona-Server-MongoDB
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 or not install them at all. This is not recommended, because it may violate security.
Disable SELinux by setting
disabled. This change takes effect after you reboot.
Run SELinux in permissive mode by setting
permissive. This change takes effect after you reboot.
You can also enforce permissive mode at runtime using the
setenforce 0command. 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
It runs as a service named
Starting the service
Percona Server for MongoDB is not started automatically after installation. Start it manually using the following command:
$ sudo service mongod start
Confirming that service is running
Check the service status using the following command:
$ sudo service mongod status
Stopping the service
Stop the service using the following command:
$ sudo service mongod stop
Restarting the service
Restart the service using the following command:
$ sudo service mongod restart
On Red Hat Enterprise Linux and CentOS 7
you can also invoke all the above commands with
mongod service is not automatically started
after you reboot the system.
For RHEL or CentOS versions 5 and 6, you can use the
to enable auto-start as follows:
$ chkconfig --add mongod
For RHEL or CentOS version 7, you can use the
systemctl utility as follows:
$ systemctl enable mongod
To completely uninstall Percona Server for MongoDB you’ll need to remove all the installed packages and data files:
Stop the Percona Server for MongoDB service:
$ sudo service mongod stop
Remove the packages:
$ sudo yum remove Percona-Server-MongoDB*
Remove the data and configuration files:
$ rm -rf /var/lib/mongodb $ rm -f /etc/mongod.cnf
This will remove all the packages and delete all the data files (databases, tables, logs, etc.). You might want to back up your data before doing this in case you need the data later.
|||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, |