Skip to main content
Version: ⭐ 24.04

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:

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

Accept all GPG keys and consider rebooting 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 the system reboot, perform a quick check of the SELinux status:

getenforce

You should have this result:

Disabled

Note that this deactivation should be temporary. To enable SELinux again, edit the /etc/selinux/config file and change the value with the following options:

  • SELINUX=enforcing to make SELinux security policy enforced.
  • SELINUX=permissive to make SELinux print warnings instead of enforce security policy.

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​

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

Database repository​

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"

Centreon repository​

To install Centreon software, you should first install the Centreon repository.

Install the Centreon repository using this command:

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

Step 2: Installation​

This section describes how to install a Centreon Remote Server.

You can install this 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

You can now move on to the next step.

Step 3: Configuration​

Server name​

If you want to change the server's name, use the following command:

hostnamectl set-hostname new-server-name

Replace new-server-name with the name of your choice. Example:

hostnamectl set-hostname remote1

Set the PHP time zone​

You are required to set the PHP time zone.

Run the command:

echo "date.timezone = Europe/Paris" >> /etc/php.d/50-centreon.ini

Replace Europe/Paris with your time zone. You can find the list of supported time zones here.

After saving the file, remember to 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 remote server if you are using a local database, or on your dedicated database server):

systemctl enable mariadb
systemctl restart mariadb

Secure the database​

If you have installed the Centreon server with a local database, it is mandatory to secure the database's root access before installing Centreon. Run the following command:

mariadb-secure-installation
  • Answer yes to all 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​

  1. Start the Apache server with the following command:
systemctl start httpd
  1. To complete the installation, follow the web installation steps procedure.

During web installation, it is not necessary to install the Autodiscovery module.

In the step Initialization of the monitoring, only actions 6 to 8 need to be done.

Step 5: Register the server​

To transform the server into a Remote Server and to register it to the Central server or another Remote server, execute the following command on the future remote server:

/usr/share/centreon/bin/registerServerTopology.sh -u <API_ACCOUNT> \
-t remote -h <IP_TARGET_NODE> -n <REMOTE_SERVER_NAME>

Example:

/usr/share/centreon/bin/registerServerTopology.sh -u admin -t remote -h 192.168.0.1 -n remote-1

Replace <IP_TARGET_NODE> with the IP of the central server, as seen by the remote server.

The <API_ACCOUNT> must have access to the configuration API. You can use the default admin account.

If you need to change the HTTP method or the port, you can use the following format for the -h option: HTTPS://<IP_TARGET_NODE>:PORT

Then follow instructions by

  1. Entering your password:

    192.168.0.1: please enter your password:
  2. Select the IP address if multiple network interfaces exist:

    Which IP do you want to use as CURRENT NODE IP?
    1) 192.168.0.2
    2) 192.168.0.3
    1
  3. Then validate the information:

    Summary of the information that will be sent:

    API connection:
    username: admin
    password: ******
    target server: 192.168.0.1

    Pending Registration Server:
    name: remote-1
    type: remote
    address: 192.168.0.2

    Do you want to register this server with the previous information? (y/n)y
  4. Add additional information to enable future communication between your Remote Server and its Central, fill in the required information to convert your platform into a Remote server:

    <CURRENT_NODE_ADDRESS>: Please enter your username:
    admin
    <CURRENT_NODE_ADDRESS>: Please enter your password:

    <CURRENT_NODE_ADDRESS>: Protocol [http]:
    <CURRENT_NODE_ADDRESS>: Port [80]:
    <CURRENT_NODE_ADDRESS> : centreon root folder [centreon]:
  5. If you use a proxy, please define credentials:

    Are you using a proxy? (y/n)
    y
    enter your proxy Host:
    myproxy.example.com
    enter your proxy Port [3128]:
    Are you using a username/password? (y/n)
    y
    enter your username:
    my_proxy_username
    enter your password:

You will receive the validation of the Centreon central server:

2020-10-16T17:19:37+02:00 [INFO]: The CURRENT NODE 'remote: 'remote-1@192.168.0.2' has been converted and registered successfully.

Main error messages​

2020-10-20T10:23:15+02:00 [ERROR]: Invalid credentials

Your credentials are incorrect for the <API_ACCOUNT>.

2020-10-20T10:24:59+02:00 [ERROR]: Access Denied.

The <API_ACCOUNT> doesn't have access to configuration API.

Couldn't connect to 192.168.0.1:444; Connection refused

Unable to access the API. Please check <IP_TARGET_NODE>, scheme and port.

2020-10-20T10:39:30+02:00 [ERROR]: Can’t connect to the API using: https://192.168.0.1:443/centreon/api/latest/login

The access url is incomplete or invalid. Use the --root option to define the API URL Path. For example: --root monitoring.

2020-10-20T10:42:23+02:00 [ERROR]: No route found for β€œPOST /centreon/api/latest/platform/topology”

Your Centreon target version is invalid. It should be greater than or equal to 24.04.

Step 6: Extend local DBMS rights​

Finally, add rights for the centreon database user to use LOAD DATA INFILE command:

mysql -u root -p
GRANT FILE on *.* to 'centreon'@'localhost';
SET GLOBAL local_infile=1;
exit

Step 7: Add the Remote Server to the configuration​

Go to the Add a Remote Server to configuration.

Step 8: Secure your platform​

Remember to secure your Centreon platform following our recommendations