====== Install GLPI ====== ===== Install et Update system ===== sudo apt update sudo apt upgrade -y ===== Install Apache2 ===== sudo apt install apache2 ===== Install PHP 7.3 ===== ==== Step 1: Update system and Install add-apt-repository ==== sudo apt update sudo apt upgrade -y ==== Step 2: Add PHP 7.3 PPA repositor ==== Once the add-apt-repository command is available, add PHP 7.3 PPA repository sudo apt -y install lsb-release apt-transport-https ca-certificates sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.3.list ==== Step 3: Install PHP 7.3 et Extensions on Debian 8/9 ==== sudo apt update sudo apt install php -y sudo apt install libapache2-mod-php sudo apt install php-mbstring php-imap php-apcu php-cas php-xml php-xmlrpc php-curl php-ldap php-cli php-json php-mysql php-zip php-gd php-pear service apache2 restart === Check/Test version === php -v === Cette commande indique l’emplacement du php.ini : === php --ini | grep "Loaded Configuration File" ===== Install GLPI ===== ==== Download et Extract GLPI ==== cd /var/www/html wget https://github.com/glpi-project/glpi/releases/download/9.4.2/glpi-9.4.2.tgz tar -xzvf glpi-9.4.*.tgz -C /var/www/html sudo chown -R www-data /var/www/html/glpi/config sudo chown -R www-data /var/www/html/glpi/files cd /var/www/html/glpi chmod -R 775 /var/www/html/glpi/files/ ==== Config vHost Apache GLPI ==== Pour l’erreur en rouge : L’accès web au dossier “files” ne devrait pas être autorisé Vérifier le fichier .htaccess et la configuration du serveur web Ne pas relancer encore le serveur apache2. Modifier le fichier de configuration apache2 et ajouter les paramètres ci-dessous et seulement a la fin redémarrer apache: ==== Solution : Autoriser la réécriture : ==== a2enmod rewrite ==== Editer le fichier vHost apache : ==== nano /etc/apache2/sites-available/000-default.conf === Ajouter ceci : === Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted ==== Maintenant redémarrer le serveur : ==== systemctl restart apache2 ===== Install SQL ===== ==== Install MariaDB ==== apt install mariadb-server systemctl status mariadb mysql -V ==== Sécurisation de MariaDB ==== mysql_secure_installation Enter current password for root (enter for none): (appuyer sur enter car pas de password par défaut) Set root password? [Y/n] Y New password: Re-enter new password: Remove anonymous users? [Y/n] Y Disallow root login remotely? [Y/n] Y Remove test database and access to it? [Y/n] Y Reload privilege tables now? [Y/n] Y ==== Créer un user ADMIN MariaDB ==== sudo mysql -p -u root CREATE USER 'User'@'%' IDENTIFIED BY 'password_User_here'; GRANT ALL PRIVILEGES ON *.* TO 'pmauser'@'%' WITH GRANT OPTION; exit Exemple : sudo mysql -p -u root CREATE USER 'BdAdmin'@'%' IDENTIFIED BY 'MonPass'; GRANT ALL PRIVILEGES ON *.* TO 'BdAdmin'@'%' WITH GRANT OPTION; exit ===== Install PhpMyAdmin ===== ==== Download et Extract PhpMyAdmin ==== cd /var/www/html wget https://files.phpmyadmin.net/phpMyAdmin/4.9.0.1/phpMyAdmin-4.9.0.1-all-languages.zip unzip phpMyAdmin-4.9.0.1-all-languages.zip -d phpMyAdmin-4.9.0.1-all-languages cd /var/www/html/phpMyAdmin-4.9.0.1-all-languages/ mv /var/www/html/phpMyAdmin-4.9.0.1-all-languages/phpMyAdmin-4.9.0.1-all-languages/* /var/www/html/phpMyAdmin-4.9.0.1-all-languages/ rm -r phpMyAdmin-4.9.0.1-all-languages/ mkdir tmp ls cp config.sample.inc.php config.inc.php sudo mkdir -p /var/www/html/phpMyAdmin-4.9.0.1-all-languages/tmp sudo chown -R www-data:www-data /var/www/html/phpMyAdmin-4.9.0.1-all-languages sudo chmod -R 755 /var/www/html/phpMyAdmin-4.9.0.1-all-languages ==== Editer le fichier "config.inc.php" exemple : ==== nano /var/www/html/phpMyAdmin-4.9.0.1-all-languages/config.inc.php === Modifier la ligne : === $cfg['blowfish_secret'] = ''; par $cfg['blowfish_secret'] = 'LeGlpiDuCanumEstTropBeauDeVincent1890'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ === Ajouter la ligne : === $cfg['TempDir'] = '/var/www/html/phpMyAdmin-4.9.0.1-all-languages/tmp'; ==== Editer le fichier vhost apache ==== nano /etc/apache2/sites-available/000-default.conf # phpMyAdmin default Apache configuration Alias /phpmyadmin /var/www/html/phpMyAdmin-4.9.0.1-all-languages Options SymLinksIfOwnerMatch DirectoryIndex index.php Order Deny,Allow Deny from all Allow from localhost Allow from 127.0.0.1 Allow from 192.168.10.0/24 ==== Remplace dans php.ini ==== ; How many GET/POST/COOKIE input variables may be accepted max_input_vars = 1000 par max_input_vars = 5000 ==== redémarrer apache2 ==== systemctl restart apache2 ===== Autres Infos ===== ==== Identifiant par défaut de GLPI ==== glpi/glpi pour le compte administrateur \\ tech/tech pour le compte technicien \\ normal/normal pour le compte normal \\ post-only/postonly pour le compte postonly \\ ==== Adresse télémetry ==== [[https://canum-test.univ-nantes.fr/glpi_test/ajax/telemetry.php]] \\ ===== Sources : ===== [[https://wiki.glpi-project.org/doku.php?id=en:permissions_needed_by_glpi]] \\ [[https://glpi-install.readthedocs.io/en/latest/install/]] \\ [[https://forum.glpi-project.org/viewtopic.php?id=166238]] \\ [[https://fideloper.com/user-group-permissions-chmod-apache]] \\ [[https://forum.glpi-project.org/viewtopic.php?pid=360583]] \\ [[http://www.javascriptkit.com/script/script2/chmodcal.shtml]] \\ [[https://pixelabs.fr/installation-et-configuration-de-glpi/#Installation_Apache2]] \\ [[https://pixelabs.fr/installation-et-configuration-de-glpi/#Installation]] \\ [[https://devanswers.co/phpmyadmin-access-denied-for-user-root-localhost/]] \\ [[https://devanswers.co/installing-phpmyadmin-apache-ubuntu-18-04/]] \\ [[https://devanswers.co/how-to-reset-mysql-root-password-ubuntu/]] \\ **glpi-collecteur-creation-automatique-de-ticket** \\ [[https://rdr-it.com/glpi-collecteur-creation-automatique-de-ticket/]] \\ **GLPI : installation sous Windows Server 2016** \\ [[https://ms-sec.fr/?p=2759]] \\