Using packages
Centreon provides RPM and DEB packages for its products through the Centreon Open Source version available free of charge in our repository.
These packages can be installed on Alma/RHEL/Oracle Linux 8 and 9 and on Debian 11 and 12.
You must run the installation procedure as a privileged user.
When you run a command, check its output. If you get an error message, stop the procedure and fix the issue.
Prerequisites
After installing your server, update your operating system using the following command:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
dnf update
Additional configuration
If you intend to use Centreon in French, Spanish, Portuguese or German, install the corresponding packages:
dnf install glibc-langpack-fr
dnf install glibc-langpack-es
dnf install glibc-langpack-pt
dnf install glibc-langpack-de
Use the following command to check which languages are installed on your system:
locale -a
dnf update
Additional configuration
If you intend to use Centreon in French, Spanish, Portuguese or German, install the corresponding packages:
dnf install glibc-langpack-fr
dnf install glibc-langpack-es
dnf install glibc-langpack-pt
dnf install glibc-langpack-de
Use the following command to check which languages are installed on your system:
locale -a
apt update && apt upgrade
Accept all GPG keys and reboot your server if a kernel update is proposed.
Step 1: Pre-installation
Disable SELinux
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
During installation, SELinux should be disabled. To do this, edit the file /etc/selinux/config and replace enforcing with disabled. You can also run the following command:
sed -i s/^SELINUX=.*$/SELINUX=disabled/ /etc/selinux/config
Reboot your operating system to apply the change.
reboot
After system startup, perform a quick check of the SELinux status:
getenforce
You should have this result:
Disabled
Note that this deactivation should be temporary. SELinux should be reenabled after installation for security reasons.
During installation, SELinux should be disabled. To do this, edit the file /etc/selinux/config and replace enforcing with disabled. You can also run the following command:
sed -i s/^SELINUX=.*$/SELINUX=disabled/ /etc/selinux/config
Reboot your operating system to apply the change.
reboot
After system startup, perform a quick check of the SELinux status:
getenforce
You should have this result:
Disabled
Note that this deactivation should be temporary. SELinux should be reenabled after installation for security reasons.
SELinux is not installed on Debian 11 and 12, continue.
Configure or disable the firewall
If your firewall is active, add firewall rules. You can also disable the firewall during installation by running the following commands:
systemctl stop firewalld
systemctl disable firewalld
Install the repositories
- Alma 8
- RHEL 8
- Oracle Linux 8
- Alma 9
- RHEL 9
- Oracle Linux 9
- Debian 11 & 12
Remi repository
To install Centreon you will need to install the remi repository.
Run the following commands:
dnf install -y dnf-plugins-core
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf config-manager --set-enabled 'powertools'
Enable PHP 8.1 using the following commands:
dnf module reset php
dnf module install php:remi-8.1
Remi and CodeReady Builder repository
To install Centreon you will need to install the remi and CodeReady Builder repositories.
Run the following commands:
dnf install -y dnf-plugins-core
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
If your server is a Cloud RHEL instance, you will have to execute the following command:
dnf config-manager --set-enabled codeready-builder-for-rhel-8-rhui-rpms
Enable PHP 8.1 using the following commands:
dnf module reset php
dnf module install php:remi-8.1
Remi and CodeReady Builder repositories
To install Centreon you will need to install the remi and CodeReady Builder repositories.
Run the following commands:
dnf install -y dnf-plugins-core
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf config-manager --set-enabled ol8_codeready_builder
Enable PHP 8.1 using the following commands:
dnf module reset php
dnf module install php:remi-8.1
To install Centreon you will need to install the CodeReady Builder repository.
Run the following commands:
dnf install dnf-plugins-core
dnf install epel-release
dnf config-manager --set-enabled crb
Enable PHP 8.1 using the following commands:
dnf module reset php
dnf module install php:8.1
To install Centreon you will need to install the CodeReady Builder repository.
Run the following commands:
dnf install -y dnf-plugins-core
dnf install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms
If your server is a Cloud RHEL instance, you will have to execute the following command:
dnf config-manager --set-enabled codeready-builder-for-rhel-9-rhui-rpms
Enable PHP 8.1 using the following commands:
dnf module reset php
dnf module install php:8.1
To install Centreon you will need to install the CodeReady Builder repository.
Run the following commands:
dnf install dnf-plugins-core
dnf install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
dnf config-manager --set-enabled ol9_codeready_builder
Enable PHP 8.1 using the following commands:
dnf module reset php
dnf module install php:8.1
Install dependencies
Install the following dependencies:
apt update && apt install lsb-release ca-certificates apt-transport-https software-properties-common wget gnupg2 curl
Add Sury APT repository for PHP 8.1
To install the Sury repository, execute the following command:
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/sury-php.list
Then import the repository key:
wget -O- https://packages.sury.org/php/apt.gpg | gpg --dearmor | tee /etc/apt/trusted.gpg.d/php.gpg > /dev/null 2>&1
apt update
Database repository
- MariaDB
- MySQL
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11
- Debian 12
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --os-type=rhel --os-version=8 --mariadb-server-version="mariadb-10.11"
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --os-type=rhel --os-version=9 --mariadb-server-version="mariadb-10.11"
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | bash -s -- --os-type=debian --os-version=11 --mariadb-server-version="mariadb-10.11"
Nothing to do, MariaDB 10.11 is already available in the official repositories.
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
Nothing to do, MySQL 8.0 is already available in the official repositories.
Nothing to do, MySQL 8.0 is already available in the official repositories.
wget -P /tmp/ https://dev.mysql.com/get/mysql-apt-config_0.8.29-1_all.deb
apt install /tmp/mysql-apt-config_0.8.29-1_all.deb
# Select Ok to validate installation of "MySQL Tools & Connectors"
apt update
Centreon repository
To install Centreon software, you should first install the Centreon repository.
Install the Centreon repository using this command:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/24.04/el8/centreon-24.04.repo
dnf clean all --enablerepo=*
dnf update
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/24.04/el9/centreon-24.04.repo
dnf clean all --enablerepo=*
dnf update
To install the Centreon repository, execute the following command:
echo "deb https://packages.centreon.com/apt-standard-24.04-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon.list
echo "deb https://packages.centreon.com/apt-plugins-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon-plugins.list
Then import the repository key:
wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1
apt update
Step 2: Installation
This section describes how to install a Centreon central server.
You can install this server with a local database on the server or a remote database on a dedicated server.
- With a local database
- With a remote database
- MariaDB
- MySQL
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
dnf install -y centreon-mariadb centreon
systemctl daemon-reload
systemctl restart mariadb
dnf install -y centreon-mariadb centreon
systemctl daemon-reload
systemctl restart mariadb
apt update
apt install -y --no-install-recommends centreon-mariadb centreon
systemctl daemon-reload
systemctl restart mariadb
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
dnf install -y mysql-server mysql
dnf install -y centreon-mysql centreon
systemctl enable --now mysqld
echo "default-authentication-plugin=mysql_native_password" >> /etc/my.cnf.d/mysql-server.cnf
sed -Ei 's/LimitNOFILE\s\=\s[0-9]{1,}/LimitNOFILE = 32000/' /usr/lib/systemd/system/mysqld.service
systemctl daemon-reload
systemctl restart mysqld
dnf install -y mysql-server mysql
dnf install -y centreon-mysql centreon
systemctl enable --now mysqld
echo "default-authentication-plugin=mysql_native_password" >> /etc/my.cnf.d/mysql-server.cnf
sed -Ei 's/LimitNOFILE\s\=\s[0-9]{1,}/LimitNOFILE = 32000/' /usr/lib/systemd/system/mysqld.service
systemctl daemon-reload
systemctl restart mysqld
apt update
apt install -y centreon-mysql
apt install -y --no-install-recommends centreon
# Select "Use Legacy Authentication Method"
systemctl daemon-reload
systemctl restart mysql
If installing the database on a dedicated server, this server should also have the prerequisite repositories.
Run the following command on the Central server:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
dnf install -y centreon-central
dnf install -y centreon-central
apt update
apt install -y --no-install-recommends centreon-central
Then run the following commands on the dedicated server for your database:
- MariaDB
- MySQL
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
dnf install -y centreon-mariadb
systemctl daemon-reload
systemctl restart mariadb
dnf install -y centreon-mariadb
systemctl daemon-reload
systemctl restart mariadb
apt update
apt install -y --no-install-recommends centreon-mariadb
systemctl daemon-reload
systemctl restart mariadb
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
dnf install -y mysql-server mysql
dnf install -y centreon-mysql
systemctl enable --now mysqld
echo "default-authentication-plugin=mysql_native_password" >> /etc/my.cnf.d/mysql-server.cnf
sed -Ei 's/LimitNOFILE\s\=\s[0-9]{1,}/LimitNOFILE = 32000/' /usr/lib/systemd/system/mysqld.service
systemctl daemon-reload
systemctl restart mysqld
dnf install -y mysql-server mysql
dnf install -y centreon-mysql
systemctl enable --now mysqld
echo "default-authentication-plugin=mysql_native_password" >> /etc/my.cnf.d/mysql-server.cnf
sed -Ei 's/LimitNOFILE\s\=\s[0-9]{1,}/LimitNOFILE = 32000/' /usr/lib/systemd/system/mysqld.service
systemctl daemon-reload
systemctl restart mysqld
apt update
apt install -y --no-install-recommends centreon-mysql
# Select "Use Legacy Authentication Method"
systemctl daemon-reload
systemctl restart mysqld
It is mandatory to set a password for the root user of the database.
Secure your database root access by executing the following command:
- MariaDB
- MySQL
mariadb-secure-installation
mysql_secure_installation
Then, in the remote dabatase, create a user with root privileges. You will have to enter this user during the web installation process (at step 6, in the Root user and Root password fields).
CREATE USER '<USER>'@'<CENTRAL_SERVER_IP>' IDENTIFIED BY '<PASSWORD>';
GRANT ALL PRIVILEGES ON *.* TO '<USER>'@'<CENTRAL_SERVER_IP>' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Example:
CREATE USER 'dbadmin'@'<CENTRAL_SERVER_IP>' IDENTIFIED BY '<DBADMIN_PASSWORD>';
GRANT ALL PRIVILEGES ON *.* TO 'dbadmin'@'<CENTRAL_SERVER_IP>' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Replace \<CENTRAL_SERVER_IP> with the Centreon Central IP address that will connect to the database server.
Replace \<USER> and \<PASSWORD> with the user's credentials.
This user will only be used for the installation process; once the web installation is complete you can delete this user using:
DROP USER '<USER>'@'<CENTRAL_SERVER_IP>';
Example:
DROP USER 'dbadmin'@'<CENTRAL_SERVER_IP>';
- MariaDB
- MySQL
- The package centreon-mariadb installs an optimized MariaDB configuration to be used with Centreon.
If this package is not installed, system limitation LimitNOFILE should be at least set to 32000 using a dedicated configuration file; for example:
$ cat /etc/systemd/system/mariadb.service.d/centreon.conf
[Service]
LimitNOFILE=32000
- Same for the MariaDB open_files_limit directive:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
$ cat /etc/my.cnf.d/centreon.cnf
[server]
innodb_file_per_table=1
open_files_limit=32000
$ cat /etc/my.cnf.d/centreon.cnf
[server]
innodb_file_per_table=1
open_files_limit=32000
$ cat /etc/mysql/mariadb.conf.d/80-centreon.cnf
[server]
innodb_file_per_table=1
open_files_limit=32000MariaDB must listen to all interfaces instead of localhost/127.0.0.1, which is the default value. Edit the following file:
/etc/mysql/mariadb.conf.d/50-server.cnf
Set the bind-address parameter to 0.0.0.0 and restart mariadb.
systemctl restart mariadb
- The package centreon-mysql installs an optimized MySQL configuration to be used with Centreon.
If this package is not installed, system limitation LimitNOFILE should be at least set to 32000 using a dedicated configuration file; for example:
$ cat /etc/systemd/system/mysqld.service.d/centreon.conf
[Service]
LimitNOFILE=32000
- Same for the MySQL open_files_limit directive:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
$ cat /etc/my.cnf.d/centreon.cnf
[server]
innodb_file_per_table=1
open_files_limit=32000
$ cat /etc/my.cnf.d/centreon.cnf
[server]
innodb_file_per_table=1
open_files_limit=32000
$ cat /etc/mysql/mysql.conf.d/80-centreon.cnf
[server]
innodb_file_per_table=1
open_files_limit=32000MySQL must listen to all interfaces instead of localhost/127.0.0.1, which is the default value. Edit the following file:
/etc/mysql/mysql.conf.d/50-server.cnf
Set the bind-address parameter to 0.0.0.0 and restart mysql.
systemctl restart mysqld
In addition to the directives above, it is strongly recommended to tune the database configuration with the following parameters:
[server]
key_buffer_size = 256M
sort_buffer_size = 32M
join_buffer_size = 4M
thread_cache_size = 64
read_buffer_size = 512K
read_rnd_buffer_size = 256K
max_allowed_packet = 128MOptionally, tune the memory and buffer utilization of the InnoDB engine powered tables. The example below applies to a database server with 8 GB RAM
innodb_buffer_pool_size=1G
Remember to restart database after changing the configuration.
Step 3: Configuration
Server name
If you want to change the server's hostname, use the following command:
hostnamectl set-hostname new-server-name
Replace new-server-name with the name of your choice. Example:
hostnamectl set-hostname central
Set the PHP time zone
You are required to set the PHP time zone.
Replace Europe/Paris with your time zone. You can find the list of supported time zones here.
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
Run the following command as root
:
echo "date.timezone = Europe/Paris" >> /etc/php.d/50-centreon.ini
After saving the file, restart the PHP-FPM service:
systemctl restart php-fpm
Run the following command as root
:
echo "date.timezone = Europe/Paris" >> /etc/php.d/50-centreon.ini
After saving the file, restart the PHP-FPM service:
systemctl restart php-fpm
echo "date.timezone = Europe/Paris" >> /etc/php/8.1/mods-available/centreon.ini
The PHP timezone was defined during the installation process by retrieving the timezone configured on the operating system.
After saving the file, restart the PHP8.1-FPM service:
systemctl restart php8.1-fpm
Service startup during system bootup
To make services start automatically during system bootup, run these commands on the central server:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
systemctl enable php-fpm httpd centreon cbd centengine gorgoned snmptrapd centreontrapd snmpd
systemctl enable crond
systemctl start crond
systemctl enable php-fpm httpd centreon cbd centengine gorgoned snmptrapd centreontrapd snmpd
systemctl enable crond
systemctl start crond
systemctl enable php8.1-fpm apache2 centreon cbd centengine gorgoned centreontrapd snmpd snmptrapd
Then execute the following command (on the central server if you are using a local database, or on your remote database server):
- MariaDB
- MySQL
systemctl enable mariadb
systemctl restart mariadb
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
systemctl enable mysqld
systemctl restart mysqld
systemctl enable mysqld
systemctl restart mysqld
systemctl enable mysql
systemctl restart mysql
Secure the database
It is mandatory to secure the database's root access before installing Centreon. If you are using a local database, run the following command on the central server:
- MariaDB
- MySQL
mariadb-secure-installation
mysql_secure_installation
- Answer yes to all the questions except "Disallow root login remotely?".
- It is mandatory to set a password for the root user of the database. You will need this password during the web installation.
For more information, please see the official MariaDB documentation.
Step 4: Web installation
- Start the Apache server with the following command:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
systemctl start httpd
systemctl start httpd
systemctl start apache2
- To complete the installation, follow the web installation procedure.