Centreon is an open-source monitoring system for monitoring IT infrastructures. Due to its modular structure and good scalability suitable for monitoring small to big networks through to complex IT environments with hundreds of hosts. Here in this tutorial, we will learn the commands to install the Open Source Centreon monitoring tool on AlmaLinux 8 or Rocky Linux 8 RPM Linux.
The project Centreon started in 2005 and was distributed among developers under GPLv2 and Apache Open Source licenses. It comes in four editions- Open Source; IT Edition; Business Edition and MSP Edition. Of course, editions other than open-source are subscription-based and with extra features as compared to community (open source) ones.
Just like Nagios or Icinga, Centreon also offers a web interface to view and manage multiple systems, furthermore, configuration through the Centreon web interface makes the effort considerably easier, especially when monitoring complex IT environments with hundreds of hosts and services.
Centreon can be put into operation on various Linux distributions. CentOS and various Debian derivatives are officially planned. Centreon Web requires an Apache web server for operation; MySQL is used for the required database.
As a multi-user system, Centreon offers well-thought-out rights management. It is thus possible to provide users or groups with only part of the monitoring results or to restrict the configuration options.
Steps to install Centreon on AlmaLinux 8 | Rocky Linux 8
Requirements:
• Apache web-server
• MariaDB Database
• 1 vCPU / 1 GB for less than 50 hosts
Run DNF update command on Almalinux or Rocky
First of all, use the DNF package manager and run the system update command to make sure all the packages are up to date including the repository cache.
sudo dnf update
Disable SELinux for proper Centreon installation
Next, disable SElinux to let the Centreon install properly without any problem, however, once the setup is complete, you can re-enable it again.
sed -i s/^SELINUX=.*$/SELINUX=disabled/ /etc/selinux/config
Once done, reboot the system:
sudo reboot
Install EPEL, PowerTools, and REMI Repositories
To install Centreon we need some packages available through EPEL, Remi, and PowerTools. Hence, before going any further, let’s first install and enable them, if not already on your system.
sudo dnf install -y dnf-plugins-core
Install EPEL:
sudo dnf install epel-release
Install Remi Repository for PHP 8.0:
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
Enable PowerTools:
sudo dnf config-manager --set-enabled 'powertools' -y
Run update:
sudo dnf update -y
Install Apache, MariaDB Database, and PHP 8.0
Both Apache Httpd and MariaDB packages are already available through the default repository of these RHEL based Linux systems, hence just go-to for the given commands:
For Apache and MariaDB
sudo dnf install httpd httpd-tools mariadb-server mariadb -y
Start and Enable Apache and Mariadb services:
sudo systemctl enable --now httpd mariadb
Secure Database:
Run the given command, to get a guided text-based set up for the removal of demo database and anonymous user including limiting the remote access to the database:
mysql_secure_installation
Fo PHP 8.0
sudo dnf module reset php sudo dnf module install php:remi-8.0 -y
Add Centreon Repository on AlamLinux or Rocky Linux 8
As the packages to install Centreon are not available on AlmaLinux or Rocky Linux, hence we have to add it manually using the command given below:
sudo dnf install -y https://yum.centreon.com/standard/21.10/el8/stable/noarch/RPMS/centreon-release-21.10-2.el8.noarch.rpm
Command to install Centreon on Almalinux | Rocky Linux 8
We have installed all the required things, now let’s use the DNF package manager to install packages of Centreon on RHEL based Linux such as AlamLinux, Rocky, or CentOS.
sudo dnf install centreon centreon-database -y
Set the PHP time zone
You are required to set the PHP time zone.
sudo su - echo "date.timezone = Europe/Paris" >> /etc/php.d/50-centreon.ini
Note: Change Europe/Paris without your Timezone. You can find the list of supported time zones here.
Enable services to start with system boot
sudo systemctl enable php-fpm httpd mariadb cbd centreon sudo systemctl enable centengine gorgoned snmptrapd centreontrapd snmpd
sudo systemctl restart php-fpm httpd mariadb cbd centreon sudo systemctl restart centengine gorgoned snmptrapd centreontrapd snmpd
Allow port 80 and 443 in the firewall
If you have enabled firewall then allow http
and https
ports in the firewall:
sudo firewall-cmd --zone=public --permanent --add-port=80/tcp sudo firewall-cmd --zone=public --permanent --add-port=443/tcp
sudo systemctl reload firewalld
Access Cenetron Web installation
Now, open the web browser on your local system that can access the server IP address where you have installed the Cenetron Monitoring tool.
Example:
http://server-ip/cenetron
Configuration and Setting Up Database
Follow the guided web-based configuration wizard of Centreon and then when the “Admin information” page comes, set password for Admin user account.
On the Database setup page, add the root user password you have set for the Database server. After that enter whatever password you want to set for Database “centreon” for the Centreon Monitoring tool.
Dashboard Centreon Monitoring tool
Once you logged in, the Dashboard will appear.
To install Poller on some remote system to monitor you can refer to the official documentation.
Other Tutorials:
• 5 Best htop alternatives to monitor Linux systems
• 7 Best Gnome system monitor alternative Linux applications
• How to install Netdata on Linux such as Ubuntu 20.04 Server