Vous êtes sur la page 1sur 11

Installation GLPI 10

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)

Pour GLPI version 10.x.x, la version minimum de PHP est la 7.4.


Par défaut Debian 10, ne dispose pas de la version PHP 7.4 il faut donc installer Debian 11

Étapes
1. Installation du serveur web Apache2

2. Installation de PHP

3. Installation du serveur de base de données MariaDb

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

Par défaut c’est bind-address = 127.0.0.1


Le remplacer par : bind-address = 0.0.0.0

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.

Enter current password for root (enter for none):


OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y


New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone


to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y


... Success!

Normally, root should only be allowed to connect from 'localhost'. This


ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] n


... skipping.

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.

Remove test database and access to it? [Y/n] y


- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y


... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

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

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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)

MariaDB [(none)]> grant all privileges on glpidb.* to glpiuser@localhost identified by 'secret';


Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> quit

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>

Le répertoire indiqué doit être celui de GLPI ou le niveau supérieur


Il est possible comme type de directive dans AllowOverride de ne pas mettre All mais une liste plus
restrictive de types

3 / 11
Extraction de l’archive GLPI

Dans /var/www/html il faut extraire l’archive glpi-10.0.x.tgz


Il est aussi nécessaire de mettre en utilisateur et groupe propriétaire du répertoire glpi, l’utilisateur :
www-data:www-data

# cd /var/www/html/
# tar zxf ~jean-yves/glpi-10.0.2.tgz
# chown -R www-data:www-data glpi

Configuration avec l’interface WEB

http://@IP_Serveur_Web/glpi

Configuration initiale de 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

Le fichier d’installation glpi/install/install.php devra être supprimé

11 / 11

Vous aimerez peut-être aussi