prive:linux:app-service:glpi

Install GLPI

sudo apt update
sudo apt upgrade -y
sudo apt install apache2
sudo apt update
sudo apt upgrade -y

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
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"
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/
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:
a2enmod rewrite
nano /etc/apache2/sites-available/000-default.conf

Ajouter ceci :

<Directory /var/www/html/glpi>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All
  Require all granted
</Directory>
systemctl restart apache2
apt install mariadb-server
systemctl status mariadb
mysql -V
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
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
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
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';
nano /etc/apache2/sites-available/000-default.conf
# phpMyAdmin default Apache configuration
Alias /phpmyadmin /var/www/html/phpMyAdmin-4.9.0.1-all-languages
<Directory /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
</Directory>
; How many GET/POST/COOKIE input variables may be accepted
max_input_vars = 1000

par

max_input_vars = 5000
systemctl restart apache2
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 \\
  • prive/linux/app-service/glpi.txt
  • Dernière modification : 2024/09/11 13:37
  • de 127.0.0.1