====== GLPI 10.0 sur Debian 12 ======
===== 1. Prérequis =====
=== 1.1 Configuration Système ===
| **Composant** | **Minimum** | **Recommandé** |
|---------------------|-------------|----------------|
| Debian 12 | ✓ | ✓ |
| RAM | 2GB | 4GB+ |
| CPU | 2 cœurs | 4 cœurs |
| Stockage | 20GB | 50GB |
=== 1.2 Installation des Paquets ===
sudo apt update && sudo apt upgrade -y
sudo apt install -y apache2 mariadb-server php php-{mysql,gd,curl,xml,intl,zip,ldap,apcu,bz2,mbstring} \
graphviz
===== 2. Configuration de la Base de Données ====
=== 2.1 Sécurisation MariaDB ===
sudo mysql_secure_installation
=== 2.2 Création de la Base GLPI ===
CREATE DATABASE glpidb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'glpiuser'@'localhost' IDENTIFIED BY 'MotDePasseComplexe123!';
GRANT ALL PRIVILEGES ON glpidb.* TO 'glpiuser'@'localhost';
FLUSH PRIVILEGES;
===== 3. Installation de GLPI ====
=== 3.1 Téléchargement ===
wget https://github.com/glpi-project/glpi/releases/download/10.0.7/glpi-10.0.7.tgz
tar -xzvf glpi-10.0.7.tgz
sudo mv glpi /var/www/html/
sudo chown -R www-data:www-data /var/www/html/glpi
=== 3.2 Configuration Apache ===
sudo nano /etc/apache2/sites-available/glpi.conf
ServerName glpi.votredomaine.com
DocumentRoot /var/www/html/glpi/public
Require all granted
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
ErrorLog ${APACHE_LOG_DIR}/glpi_error.log
CustomLog ${APACHE_LOG_DIR}/glpi_access.log combined
Activez le site :
sudo a2ensite glpi.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
===== 4. Configuration Initiale ====
=== 4.1 Assistant Web ===
1. Accédez à : `http://votre-ip/glpi/install/install.php`
2. Suivez les étapes :
- Langue : Français
- Licence : Accepter
- Base de données : Remplir avec les infos MariaDB
=== 4.2 Sécurité Post-Install ===
sudo rm -rf /var/www/html/glpi/install
sudo chmod 640 /var/www/html/glpi/config/config_db.php
===== 5. Intégration avec FusionInventory ====
=== 5.1 Installation ===
wget https://github.com/fusioninventory/fusioninventory-for-glpi/releases/download/glpi10.0.7%2B1.0/fusioninventory-10.0.7+1.0.tar.gz
tar -xzvf fusioninventory-*.tar.gz -C /var/www/html/glpi/plugins/
=== 5.2 Activation ===
1. Dans GLPI : `Plugins > FusionInventory`
2. Cliquer sur "Installer" puis "Activer"
===== 6. Sauvegarde Automatisée ====
=== 6.1 Script de Backup ===
sudo nano /usr/local/bin/glpi_backup.sh
#!/bin/bash
DATE=$(date +%Y%m%d)
mysqldump -u glpiuser -p'MotDePasseComplexe123!' glpidb > /backups/glpi_db_$DATE.sql
tar -czvf /backups/glpi_files_$DATE.tar.gz /var/www/html/glpi
find /backups -type f -mtime +30 -delete
=== 6.2 Cron Job ===
sudo chmod +x /usr/local/bin/glpi_backup.sh
(crontab -l 2>/dev/null; echo "0 2 * * * /usr/local/bin/glpi_backup.sh") | sudo crontab -
===== 7. Documentation Complémentaire ====
* [[https://glpi-install.readthedocs.io/fr/latest/|Documentation Officielle GLPI]]
* [[https://www.it-connect.fr/glpi-gestion-de-parc-informatique/|IT-Connect : Guide GLPI]]
* [[https://github.com/fusioninventory/fusioninventory-for-glpi|FusionInventory GitHub]]
✓ Mettre à jour GLPI **mensuellement**
✓ Configurer HTTPS avec Let's Encrypt
✓ Restreindre l'accès par .htaccess
Activez OPcache pour améliorer les performances :
sudo apt install php-opcache
sudo systemctl restart apache2