Académique Documents
Professionnel Documents
Culture Documents
Sur Debian 11
Environnement
• Linux Debian 11
• Apache2 (issu des dépôts officiels)
• Php 7.4 (issu des dépôts officiels)
• MariaDb (issu des dépôts officiels)
Étapes
1. Installation du serveur web Apache2
2. Installation de PHP
Pour installer l’ensemble des logiciels nécessaires et leurs dépendances il faut exécuter la
commande suivante :
# apt install apache2 mariadb-server mariadb-client php build-essential perl libapache2-mod-perl2 libxml-simple-perl
libio-compress-perl libdbi-perl libapache-dbi-perl libdbd-mysql-perl libnet-ip-perl libsoap-lite-perl libxml-libxml-perl
libmojolicious-perl nmap snmp php7.4-mysql php7.4-gd php7.4-mbstring php-ldap php-imap php-apcu php-xmlrpc
php-soap php-cas php7.4-xml php-intl php-bz2 php-zip
Paramétrage de Mysql
En cas où la base de données doit être atteinte depuis une application non locale au serveur il est
nécessaire de modifier le paramètre bind-address dans le fichier :
/etc/mysql/mariadb.conf.d/50-server.cnf
1 / 11
Sécurisation du serveur Mysql
# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
2 / 11
Création de la base de données
Paramètres utilisés
Nom de la base : glpi
Charater set : utf8
Utilisateur : glpiuser
Mot de passe : secret
# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 47
Server version: 10.5.15-MariaDB-0+deb11u1 Debian 11
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
MariaDB [(none)]>
MariaDB [(none)]>
MariaDB [(none)]> create database glpidb character set utf8;
Query OK, 1 row affected (0.000 sec)
Apache
Permettre la prise en compte de fichiers .htaccess
Dans le fichier dédié au virtualhost pour GLPI (ou bien celui par défaut : /etc/apache2/sites-
available/000-default.conf) il faut ajouter la directive suivante :
<Directory /var/www/html>
AllowOverride All
</Directory>
3 / 11
Extraction de l’archive GLPI
# cd /var/www/html/
# tar zxf ~jean-yves/glpi-10.0.2.tgz
# chown -R www-data:www-data glpi
http://@IP_Serveur_Web/glpi
4 / 11
5 / 11
6 / 11
7 / 11
8 / 11
9 / 11
Écran de connexion
Tableau de bord
10 / 11
A la première connexion il est indiqué que les mots de passe des comptes :
• glpi
• tech-only
• tech
• normal
11 / 11