Annexes

Annexe 1 : Installation détaillée de GLPI

Prérequis système

  • Debian 12.5
  • Accès root
  • Machine virtuelle Hyper-V

Étapes d'installation

1. Préparation du système

su -
apt update && apt upgrade -y

2. Installation des composants principaux

apt install apache2 php libapache2-mod-php mariadb-server -y

3. Installation des dépendances PHP

apt install php-mysqli php-mbstring php-curl php-gd php-simplexml php-intl php-ldap php-apcu php-xmlrpc php-cas php-zip php-bz2 php-imap -y

4. Configuration de la base de données

mysql_secure_installation

mysql -u root -p
create database glpi;
create user 'glpi'@'localhost' identified by 'glpi';
grant all privileges on glpi.* to 'glpi'@'localhost' with grant option;
flush privileges;
exit;

5. Installation de GLPI

cd /tmp
wget https://github.com/glpi-project/glpi/releases/download/10.0.15/glpi-10.0.15.tgz
tar -xvzf glpi-10.0.15.tgz
rm /var/www/html/index.html
cp -r glpi/* /var/www/html/

6. Configuration des permissions

chown -R www-data /var/www/html
mkdir /etc/glpi
chown -R www-data /etc/glpi

7. Organisation des fichiers

mv /var/www/html/config /etc/glpi
mv /var/www/html/files /var/lib/glpi

8. Configuration système

Contenu de /var/www/html/inc/downstream.php :

<?php
define('GLPI_CONFIG_DIR','/etc/glpi/');
if (file_exists(GLPI_CONFIG_DIR . '/local_define.php')) {
    require_once GLPI_CONFIG_DIR . '/local_define.php';
}

Contenu de /etc/glpi/local_define.php :

<?php
define('GLPI_VAR_DIR', '/var/lib/glpi');

9. Finalisation

systemctl restart apache2

Accès à l'interface

Une fois l'installation terminée, accédez à GLPI via : http://[adresse_ip_serveur]