After installating your server, consider updating your operating system via the command:
Accept all GPG keys and consider rebooting your server if a kernel update is proposed.
SELinux should be disabled. To do this, you have to edit the file /etc/selinux/config and replace enforcing by disabled, or by running the following command:
sed -i s/^SELINUX=.*$/SELINUX=disabled/ /etc/selinux/config
Reboot your operating system to apply the change.
After system startup, perform a quick check of the SELinux status:
Configure or disable firewall
Add firewall rules or disable the firewall by running the following commands:
systemctl stop firewalld systemctl disable firewalld
Install the repositories
Redhat Software Collections repository
To install Centreon you will need to set up the official Software Collections repository supported by Redhat.
Software collections are required for installing PHP 7 and associated libraries.
Install the Software Collections repository using this command:
yum install -y centos-release-scl
To install Centreon software from the repository, you should first install the centreon-release package, which will provide the repository file.
Install the Centreon repository using this command:
yum install -y http://yum.centreon.com/standard/20.10/el7/stable/noarch/RPMS/centreon-release-20.10-2.el7.centos.noarch.rpm
This section describes how to install a Centreon Remote Server.
It's possible to install this server with a local database on the server, or a remote database on a dedicated server.
Run the commands:
yum install -y centreon centreon-database
systemctl restart mariadb
If installing database on a dedicated server, this server should also have the prerequired repositories.
Run the following command on the Centreon Remote Server:
yum install -y centreon-base-config-centreon-engine centreon-widget\*
Then run the following commands on the dedicated server:
yum install -y centreon-database
systemctl restart mariadb
Then create a distant user with root privileges needed for Centreon installation:
CREATE USER '<USER>'@'<IP>' IDENTIFIED BY '<PASSWORD>';
GRANT ALL PRIVILEGES ON *.* TO '<USER>'@'<IP>' WITH GRANT OPTION;
Once the installation is complete you can delete this user using:
DROP USER '<USER>'@'<IP>';
The package centreon-database 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, example:
cat /etc/systemd/system/mariadb.service.d/centreon.conf [Service] LimitNOFILE=32000
Same for the MariaDB open_files_limit directive, example:
cat /etc/my.cnf.d/centreon.cnf [server] innodb_file_per_table=1 open_files_limit=32000
Remember to restart MariaDB after a change to configuration.
Set the PHP time zone
You are required to set the PHP time zone. Run the command:
echo "date.timezone = Europe/Paris" >> /etc/opt/rh/rh-php72/php.d/50-centreon.ini
Change Europe/Paris to your time zone. You can find the supported list of time zone here.
After saving the file, please do not forget to restart the PHP-FPM service:
systemctl restart rh-php72-php-fpm
Services startup during system bootup
To make services start automatically during system bootup, run these commands on the central server:
systemctl enable rh-php72-php-fpm httpd24-httpd mariadb centreon cbd centengine gorgoned snmptrapd centreontrapd snmpd
If the database is on a dedicated server, remember to enable mariadb service on it.
Before starting the web installation process, start the Apache server with the following command:
systemctl start httpd24-httpd
Conclude installation by performing web installation steps.
During web installation, it is not necessary to install Autodiscovery module.
In the step Initialization of the monitoring, only the actions from 6 to 8 must be done.
Register the server
To transform the server into a Remote Server and register it to the Centreon Central server, execute the following command:
/opt/rh/rh-php72/root/bin/php /usr/share/centreon/bin/registerServerTopology.php -u <API_ACCOUNT> \ -t Remote -h <IP_TARGET_NODE> -n <REMOTE_SERVER_NAME>
/opt/rh/rh-php72/root/bin/php /usr/share/centreon/bin/registerServerTopology.php -u admin \ -t Remote -h 192.168.0.1 -n remote-1
Replace <IP_TARGET_NODE> by the IP of the Centreon server seen by the Remote Server.
The <API_ACCOUNT> must have access to configuration API. you can use 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
- Entering your password:
192.168.0.1: please enter your password
- Define if you use a proxy to connect to Centreon central server:
Are you using a proxy ? (y/n)n
If you use a proxy, please define credentials:
Are you using a proxy ? (y/n)y proxy host: myproxy.example.com proxy port: 3128 proxy username (press enter if no username/password are required): myuser please enter the proxy password:
- Select the IP adress:
Found IP on CURRENT NODE: : 192.168.0.2 Which IP do you want to use as CURRENT NODE IP ?1
- Then validate the information:
Summary of the informations that will be send: 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 those informations ? (y/n)y
You will receive the validation of the Centreon central server:
2020-10-16T17:19:37+02:00 [INFO]: The CURRENT NODE 'remote': 'firstname.lastname@example.org' linked to TARGET NODE: '192.168.0.1' has been added
Main errors 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.
Failed connect to 22.214.171.124:444; Connection refused
Unable to access to 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://126.96.36.199:443/centreon/api/latest/login
The access url is not complete or invalide. 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 or equal to 20.10.
Extend local DBMS rights
Finally, add rights to centreon database user to use LOAD DATA INFILE command:
GRANT FILE on *.* to 'centreon'@'localhost';
Add the Remote Server to configuration
Go to the Add a Remote Server to configuration.