Skip to main content

Using packages (central server)

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.

We recommend encrypting the communications of both the web server and the database, even though these steps are not required for Centreon to work. The procedure below sets up this encryption. In some cases (e.g. when running quick tests), you may want a non-secure setup: just skip step 3: Set up the TLS configuration.

Prerequisites​

After installing your host server, update your operating system using the following command:

dnf update

Additional configuration for EL 9​

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

Accept all GPG keys and reboot your server if a kernel update is proposed.

Step 1: Pre-installation​

Disable SELinux​

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.

Configure or disable the firewall​

If you have a firewall and it is active, add firewall rules. You can also disable the firewall during installation by running the following commands:

systemctl stop firewalld
systemctl disable firewalld

Note that this deactivation should be temporary. The firewall should be reenabled after installation for security reasons.

Install the repositories​

Dependencies​

dnf install dnf-plugins-core
dnf install epel-release
dnf config-manager --set-enabled crb

Install and enable PHP 8.4 using the following commands:

dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm
dnf module switch-to php:remi-8.4/common -y

Database repository​

curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | bash -s -- --os-type=rhel --os-version=9 --mariadb-server-version=mariadb-11.8 --skip-maxscale

Centreon repository​

dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/26.10/el9/centreon-26.10.repo
dnf clean all --enablerepo=*
dnf update

Step 2: Install the central server and the database​

You can install the central server with a local database on the server or a remote database on a dedicated server.

dnf install -y centreon-mariadb centreon
systemctl daemon-reload
systemctl restart mariadb

Set a password for the root user of the database by executing the following command:

mariadb-secure-installation

Answer yes to all the questions except "Disallow root login remotely?".

Step 3: Set up the TLS configuration​

Prepare the certificates​

Use a certificate issued by a trusted authority. Self-signed certificates may be used for test purposes, but they MUST NOT be used in production.

  • If you already have a certificate validated by an authority, you can proceed to the next step.
  • If you do not have a certificate validated by an authority, you can generate one on platforms such as Let's Encrypt.
  • If, for test purposes, you want to use a self-signed certificate, follow this procedure before activating HTTPS mode on your server. Note that you will have to import the CA certificate into your browser.

Say you have the following files (in our example, in /etc/pki/centreon-tls/ on EL 9 or 10, or /etc/ssl/certs/centreon-tls on Debian 13):

  • rootCA.pem (public - not needed if you are using a trusted certificate)
  • web.pem (web server certificate)
  • web-key.pem (web server private key)
  • db.pem (database server certificate)
  • db-key.pem (database server private key)
  1. Install the root CA into the OS trust store of the central server's host machine:

    cp /etc/pki/centreon-tls/rootCA.pem /etc/pki/ca-trust/source/anchors/centreon-dev.crt
    update-ca-trust extract
  2. If you are using a remote database, also execute this procedure on the machine that will host the remote database, then copy the root CA certificate of the database machine to the central server host machine's trust store.

For the database​

This section describes how to set up a TLS connection between the central server and the database.

  1. Create the configuration file for the database to start in TLS.
cat > /etc/my.cnf.d/centreon-tls.cnf <<'EOF'
[mariadb]
ssl_ca = /etc/pki/centreon-tls/rootCA.pem
ssl_cert = /etc/pki/centreon-tls/db.pem
ssl_key = /etc/pki/centreon-tls/db-key.pem
require_secure_transport = OFF
tls_version = TLSv1.2,TLSv1.3
EOF
  1. Give the following permissions on the key so that it is readable by the mysql user only:
chown root:mysql /etc/pki/centreon-tls/db-key.pem
chmod 0640 /etc/pki/centreon-tls/db-key.pem
  1. Configure MariaDB CLI to use TLS (you will need it later).
cat > /etc/my.cnf.d/centreon-tls-client.cnf <<'EOF'
[client]
ssl-ca=/etc/pki/centreon-tls/rootCA.pem
ssl-verify-server-cert
EOF
  1. Start MariaDB:
systemctl daemon-reload
systemctl enable --now mariadb
systemctl restart mariadb
  1. Secure the installation by defining a password for the database root account:
mariadb-secure-installation
  1. Check that the server is using the certificates you defined (not the certificates it generates automatically when it starts).
mariadb -e "SHOW GLOBAL VARIABLES WHERE Variable_name IN ('have_ssl','ssl_ca','ssl_cert','ssl_key');"

The expected result is:

have_ssl YES and ssl_ca /etc/pki/centreon-tls/rootCA.pem
  1. Set the environment variables that will be used by PHP to communicate with the database in TLS mode.
for f in /etc/centreon/.env /usr/share/centreon/.env; do
mkdir -p "$(dirname "$f")"
cat >> "$f" <<'EOF'
DATABASE_SSL_ENABLED=1
DATABASE_VERIFY_SERVER_CERT=1
DATABASE_CA_PATH=/etc/pki/centreon-tls/rootCA.pem
EOF
done

For the web interface​

This section describes how to set up a TLS connection between the central server and its web interface.

  1. Configure Apache TLS:
dnf install -y mod_ssl
echo 'Listen 443 https' > /etc/httpd/conf.d/ssl.conf
  1. Enter the correct certificate paths in Centreon's Apache HTTPS configuration:
sed -e 's|/etc/pki/tls/certs/ca.crt|/etc/pki/centreon-tls/web.pem|g' \
-e 's|/etc/pki/tls/private/ca.key|/etc/pki/centreon-tls/web-key.pem|g' \
/usr/share/centreon/examples/centreon-apache-https.conf \
> /etc/httpd/conf.d/00-centreon-tls.conf
  1. Enable and restart Centreon services:
systemctl daemon-reload

Once your web server is set to HTTPS mode, if you have a MAP server on your platform, you must set the centreon.url=https://<server-address> inside the /etc/centreon-map/map-config.properties file to use HTTPS instead of HTTP. Otherwise recent web browsers may block communication between the two servers. The procedure is detailed here.

  1. Gorgone API configuration

Replace 127.0.0.1 with the FQDN of your central server in the /etc/centreon-gorgone/config.d/31-centreon-api.yaml file, like in this example:

gorgone:
tpapi:
- name: centreonv2
base_url: "https://centreon7.localdomain/centreon/api/latest/"
username: "centreon-gorgone"
password: "XXXXX"
- name: clapi
username: "centreon-gorgone"
password: "XXXXX"

If you have customized the Centreon URI, replace /centreon with your custom path in the base_url value.

Then restart the Gorgone daemon:

systemctl restart gorgoned

Then check its status:

systemctl status gorgoned

If everything is ok, you should have something like this (example on Debian):

● gorgoned.service - Centreon Gorgone
Loaded: loaded (/usr/lib/systemd/system/gorgoned.service; enabled; preset: enabled)
Active: active (running) since Thu 2026-10-08 09:27:46 UTC; 4h 10min ago
Invocation: 40225788460245609d05c9db103f1ff3
Main PID: 807 (perl)
Tasks: 51 (limit: 4618)
Memory: 176.2M (peak: 241.4M)
CPU: 9.461s
CGroup: /system.slice/gorgoned.service
β”œβ”€ 807 /usr/bin/perl /usr/bin/gorgoned --config=/etc/centreon-gorgone/config.yaml --logfile=/var/log/centreon-gorgone/gorgoned.log --severity=error
β”œβ”€1073 gorgone-proxy
β”œβ”€1075 gorgone-proxy
β”œβ”€1076 gorgone-proxy
β”œβ”€1077 gorgone-proxy
β”œβ”€1080 gorgone-proxy
β”œβ”€1086 gorgone-engine
β”œβ”€1089 gorgone-audit
β”œβ”€1097 gorgone-legacycmd
β”œβ”€1098 gorgone-httpserver
β”œβ”€1100 gorgone-nodes
β”œβ”€1107 gorgone-statistics
β”œβ”€1108 gorgone-cron
β”œβ”€1113 gorgone-anomalydetection
β”œβ”€1125 gorgone-autodiscovery
β”œβ”€1133 gorgone-action
└─1137 gorgone-dbcleaner

Oct 08 09:27:46 doc-central systemd[1]: Started gorgoned.service - Centreon Gorgone.

You should see the following line in the Gorgone daemon log file /var/log/centreon-gorgone/gorgoned.log:

2026-10-08 15:58:12 - INFO - [autodiscovery] -class- host discovery - sync started

Step 4: Configuration​

Change the server name (optional)​

If you want to change the server's hostname, use the following command, replacing new-server-name with the name of your choice:

hostnamectl set-hostname new-server-name

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.

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

Service startup during system bootup​

To make services start automatically during system bootup, run these commands on the central server:

systemctl enable php-fpm httpd centreon cbd centengine gorgoned snmptrapd centreontrapd snmpd
systemctl enable crond
systemctl start crond

Then execute the following command (on the central server if you are using a local database, or on your remote database server):

systemctl enable mariadb
systemctl restart mariadb

Step 5: Web installation​

  1. Restart the Apache server with the following command:
systemctl restart httpd
  1. To complete the installation, follow the web installation procedure.