Menu


Stacks Image 43675
Ce tuto vous explique la mise à jour de Centreon-Web pour une installation Centreon version 20.10.x sur une distribution Debian 11. On partira du principe que vous avez déjà installé une version source sur votre distribution.

1 Installation en ligne de commande

Téléchargez le binaire dans le dossier /usr/local/src et décompressez-le.
cd /usr/local/src
wget http://files.download.centreon.com/public/centreon/centreon-web-21.10.5.tar.gz
tar xzf centreon-web-21.10.5.tar.gz
cd centreon-web-21.10.5

1.1 Installation des dépendances Php

Lancer la commande dans le dossier d'installation de centreon-web-21.04.x pour installer les dépendances php
composer install --no-dev --optimize-autoloader -n

1.2 Installation des dépendances Javascript

Toujours dans le dossier d'installation de centreon-web-21.10.x, exécutez les commandes suivantes.
npm ci
npm run build

1.3 Mise à jour en ligne de commande

Lancez la ligne de commande ci-dessous pour faire la mise à jour.
./install.sh -u /etc/centreon
Au lancement du script, le programme confirme si toutes les dépendances sont satisfaites.
./install.sh -u /etc/centreon/
###############################################################################
#                                                                             #
#                           Centreon (www.centreon.com)                       #
#                                                                             #
#                               infos@centreon.com                            #
#                                                                             #
#                   Make sure you have installed and configured               #
#         centreon-gorgone - sudo - sed - php - apache - rrdtool - mysql      #
#                                                                             #
###############################################################################
------------------------------------------------------------------------
	Checking all needed binaries
------------------------------------------------------------------------
rm                                                         OK
cp                                                         OK
mv                                                         OK
/usr/bin/chmod                                             OK
/usr/bin/chown                                             OK
echo                                                       OK
more                                                       OK
mkdir                                                      OK
find                                                       OK
/usr/bin/grep                                              OK
/usr/bin/cat                                               OK
/usr/bin/sed                                               OK

------------------------------------------------------------------------
	Check mandatory gorgone service status
------------------------------------------------------------------------

Is the Gorgone module already installed?
[y/n], default to [n]:
> y
Répondre y pour gorgone. Le module d'installation va vous demander si vous utiliser les paramètres d'installation. Répondre y.
------------------------------------------------------------------------
	Detecting old installation
------------------------------------------------------------------------
Finding configuration file in: /etc/centreon               OK
You seem to have an existing Centreon.


Do you want to use the last Centreon install parameters ?
[y/n], default to [y]:
> y
Le module d'installation va alors vous si vous souhaitez installer les modules: l'interface Web Centreon, les plugins Centreon et les Traps handler Centreon. Répondre y pour tous les modules.
Using:  /etc/centreon/instCentPlugins.conf
/etc/centreon/instCentStorage.conf
/etc/centreon/instCentWeb.conf                             OK

Do you want to install : Centreon Web Front
[y/n], default to [n]:
> y

Do you want to install : Centreon Nagios Plugins
[y/n], default to [n]:
> y

Do you want to install : CentreonTrapd process
[y/n], default to [n]:
> y
Le script d'installation va maintenant procéder à l'installation des différents modules. Saisir le chemin de php fpm.
------------------------------------------------------------------------
	Gorgone module Installation
------------------------------------------------------------------------

Where is your gorgone module folder ? [/var/lib/centreon-gorgone]
default to [/var/lib/centreon-gorgone]
>
Path /var/lib/centreon-gorgone                             OK

Where is your gorgone configuration folder ? [/etc/centreon-gorgone]
default to [/etc/centreon-gorgone]
>

What is the Gorgone user ? [centreon-gorgone]
default to [centreon-gorgone]
>

What is the Gorgone group ? [centreon-gorgone]
default to [centreon-gorgone]
>

------------------------------------------------------------------------
	Start CentWeb Installation
------------------------------------------------------------------------
/usr/bin/perl                                              OK
check PHP version                                          OK
Composer dependencies are installed                        OK
Frontend application is built                              OK
Finding Apache user :                                      www-data
Finding Apache group :                                     www-data
PHP FPM config directory not found                         CRITICAL

Where is your PHP FPM conf.d directory
> /etc/php/8.1/fpm/pool.d/
Path                                                       OK
Path                                                       OK
Add group centreon to user www-data                        OK
Add group centreon to user centreon-engine                 OK
Add group centreon-engine to user www-data                 OK
Add group centreon-engine to user centreon                 OK
Add group www-data to user centreon                        OK
Pour la configuration sudo, répondre n, il ne devrait pas avoir de changement. Configuration du serveur Web. ne pas relancer Apache et PHP FPM.
------------------------------------------------------------------------
	Configure Sudo
------------------------------------------------------------------------

Where is your service command binary ?
default to [/usr/sbin/service]
>
Your sudo has been configured previously

Do you want to reconfigure your sudo ? (WARNING)
[y/n], default to [n]:
> n
Please configure your sudo with this example:
	 /usr/share/centreon/examples/centreon.sudo        PASSED

------------------------------------------------------------------------
	Configure Apache server
------------------------------------------------------------------------
Create '/etc/apache2/conf-available/centreon.conf'         OK
Configuring Apache                                         OK

Do you want to reload your Apache ?
[y/n], default to [n]:
> n

------------------------------------------------------------------------
	Configure PHP FPM service
------------------------------------------------------------------------
Create '/etc/php/8.1/fpm/pool.d/centreon.conf'             OK
Configuring PHP FPM                                        OK

Do you want to reload PHP FPM service ?
[y/n], default to [n]:
> n
Pear doit être à jour normalement, nous continuons avec la configuration de Gorgone. Répondre n car les fichiers de sont déjà installés.
Preparing Centreon temporary files
Modify rights on /var/log/centreon                         OK
Modify rights on /var/lib/centreon/installs                OK
Modify rights on /etc/centreon                             OK
Modify rights on /var/cache/centreon                       OK
Change macros for insertBaseConf.sql                       OK
Change macros for sql update files                         OK
Change macros for php files                                OK
Change macros for php env and config file                  OK
Change macros for perl binary                              OK
Modify rights on /etc/centreon-engine                      OK
Add group centreon-broker to user www-data                 OK
Add group centreon-broker to user centreon-engine          OK
Add group centreon to user centreon-broker                 OK
Add group centreon-gorgone to user centreon                OK
Add group centreon-gorgone to user www-data                OK
Add group centreon to user centreon-gorgone                OK
Add group centreon-broker to user centreon-gorgone         OK
Add group centreon-engine to user centreon-gorgone         OK
Add group www-data to user centreon-gorgone                OK
Modify rights on /etc/centreon-broker                      OK
Disconnect users from WebUI
All users are disconnected                                 FAIL
Copy CentWeb in system directory
Install CentWeb (web front of centreon)                    OK
Modify rights for install directory                        OK
Install libraries                                          OK
Write rights to Smarty Cache                               OK
Change macros for centreon.cron                            OK
Install Centreon cron.d file                               OK
Change macros for centAcl.php                              OK
Change macros for downtimeManager.php                      OK
Change macros for centreon-backup.pl                       OK
Install cron directory                                     OK
Modify rights for eventReportBuilder                       OK
Modify rights for dashboardBuilder                         OK
Modify rights for centreon-backup.pl                       OK
Modify rights for centreon-backup-mysql.sh                 OK
Change macros for centreon.logrotate                       OK
Install Centreon logrotate.d file                          OK
Prepare centFillTrapDB                                     OK
Install centFillTrapDB                                     OK
Prepare centreon_trap_send                                 OK
Install centreon_trap_send                                 OK
Prepare centreon_check_perfdata                            FAIL
Install centreon_check_perfdata                            FAIL
Prepare centreonSyncPlugins                                OK
Install centreonSyncPlugins                                OK
Prepare centreonSyncArchives                               OK
Install centreonSyncArchives                               OK
Install generateSqlLite                                    OK
Install changeRrdDsName.pl                                 OK
Install export-mysql-indexes                               OK
Install import-mysql-indexes                               OK
Install clapi binary                                       OK
Centreon Web Perl lib installed                            OK

------------------------------------------------------------------------
	Pear Modules
------------------------------------------------------------------------
Check PEAR modules
PEAR                            1.4.9       1.10.13        OK
DB                              1.7.6       1.10.0         OK
Date                            1.4.6       1.4.7          OK
All PEAR modules                                           OK
------------------------------------------------------------------------
	Achieve gorgone's module integration
------------------------------------------------------------------------
cp: impossible d'évaluer '/root/.ssh': Aucun fichier ou dossier de ce type
Cannot move the SSH keys to /var/lib/centreon-gorgone/.ssh FAIL

A configuration file already exists. Do you want to overwrite it ?
[y/n], default to [n]:
>n
If needed, please update /etc/centreon-gorgone/config.d/30-PASSEDon.yaml
Create centreon config folders                             OK

A configuration file already exists. Do you want to overwrite it ?
[y/n], default to [n]:
> n
If needed, please update /etc/centreon/config.yaml         PASSED
Gorgone configuration structure                            OK
------------------------------------------------------------------------
	Create configuration and installation files
------------------------------------------------------------------------
Fin de l'installation, répondre n pour le reste des questions.
------------------------------------------------------------------------
		Centreon Post Install
------------------------------------------------------------------------
Create /usr/share/centreon/www/install/install.conf.php    OK
Create /etc/centreon/instCentWeb.conf                      OK

------------------------------------------------------------------------
	Starting CentStorage Installation
------------------------------------------------------------------------
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
install www/install/createTablesCentstorage.sql            OK
CentStorage status Directory already exists                PASSED
CentStorage metrics Directory already exists               PASSED
Change right : /var/run/centreon                           OK
Install logAnalyserBroker                                  OK
Change macros for centstorage.cron                         OK
Install CentStorage cron                                   OK
Create /etc/centreon/instCentStorage.conf                  OK

------------------------------------------------------------------------
	Starting Centreon Plugins Installation
------------------------------------------------------------------------
Path                                                       OK
Path                                                       OK
Create /etc/centreon/instCentPlugins.conf                  OK

------------------------------------------------------------------------
	Starting CentreonTrapD Installation
------------------------------------------------------------------------
Path                                                       OK
Path                                                       OK
Finding Apache user :                                      www-data
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change macros for snmptrapd.conf                           OK
Replace CentreonTrapd init script Macro                    OK
Replace CentreonTrapd default script Macro                 OK

Do you want me to install CentreonTrapd init script ?
[y/n], default to [n]:
> n
CentreonTrapd init script not installed, please use :
 /usr/share/centreon/examples/centreontrapd.init.d         PASSED

Should I overwrite all your SNMP configuration files?
[y/n], default to [n]:
> n
Install : centreontrapdforward                             OK
Install : centreontrapd                                    OK
Change macros for centreontrapd.logrotate                  OK
Install Centreon Trapd logrotate.d file                    OK
Create /etc/centreon/instCentPlugins.conf                  OK

###############################################################################
#                                                                             #
#                         Thanks for using Centreon.                          #
#                          -----------------------                            #
#                                                                             #
#                 Go to the URL : http://central2104.home/centreon/                    #
#                   	     to finish the setup                              #
#                                                                             #
#                Please read the documentation available here :               #
#                         documentation.centreon.com                          #
#                                                                             #
#      ------------------------------------------------------------------     #
#                                                                             #
#         Report bugs at https://github.com/centreon/centreon/issues          #
#                                                                             #
#                        Contact : contact@centreon.com                       #
#                          http://www.centreon.com                            #
#                                                                             #
#                          -----------------------                            #
#              For security issues, please read our security policy           #
#              https://github.com/centreon/centreon/security/policy           #
#                                                                             #
###############################################################################
Avant de réaliser l'installation en mode Web. Arrêter le service apache et php-fpm.
systemctl stop apache2 php8.1-fpm
Vider le cache des sessions
rm /var/lib/centreon/sessions/*
Relancer les services.
systemctl start apache2 php8.1-fpm

2 Installation en mode Web

Utilisez un navigateur internet récent et saisissez l’url suivante :
http://<ip du serveur centreon>/centreon/
Stacks Image 37022
Démarrage de l'installation Web, cliquez sur "Next"
Stacks Image 37043
Validation des dépendances, cliquez sur "next".
Stacks Image 37064
Cliquez sur Next.
Stacks Image 37112
Mise à jour des bases de données, cliquez sur Next.
Stacks Image 37133
Fin de l'installation, cliquez sur Finish
Stacks Image 37154
Vous devriez avoir cette vue. Vous pouvez vous connecter à l'interface d'administration. Votre supervision fonctionne de nouveau.
Stacks Image 19895
Comme vous l’avez constaté, la mise à jour est relativement simple.
comments powered by Disqus

Nous utilisons des cookies pour nous permettre de mieux comprendre comment le site est utilisé. En continuant à utiliser ce site, vous acceptez cette politique.