apt-get install mysql-server mysql-client mysql -u root -p (Touche Enter sans mot de passe)
On crée la database glpi
MariaDB [(none)]> create database glpi;
On crée un utilisateur avec son mot de passe
MariaDB [(none)]> create user 'user_glpi'@'localhost' identified by 'mot_de_passe';
On donne tous les privilèges sur la database glpi à l'utilisateur user_glpi'@'localhost (qui est connecté en local !)
MariaDB [(none)]> grant all privileges on glpi.* to 'user_glpi'@'localhost';
On recharge les privilèges
MariaDB [(none)]> FLUSH PRIVILEGES; quit
Attention : avec cette partie il y a deux erreurs après l'installation de php7.0 donc je conseil de passer directement à la partie suivante :
more /var/log/apache2/error.log PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_mysql.so' - /usr/lib/php/20151012/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0
apt-get install apache2 php7.0 install php7.0-cgi php7.0-cli php7.0-common php7.0-curl php7.0-gd php7.0-mysql php7.0-imap php7.0ldap php7.0-xmlrpc php-apcu
cd /var/www/html tar -xzvf glpi-9.2.tgz chown -R www-data:www-data glpi chmod -R 777 glpi
En plus du message d'erreur dans le log, on peut voir le problème comme ceci :
php -v PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_mysql.so' - /usr/lib/php/20151012/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0 PHP 7.0.27-0+deb9u1 (cli) (built: Jan 5 2018 13:51:52) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
Il est donc préférable de faire comme ceci
On supprime tous les restes d'un ancienne installation de php7.0
apt-get --purge remove php7.0 php7.0-cgi php7.0-cli php7.0-common php7.0-curl php7.0-gd php7.0-mysql php7.0-imap php7.0-ldap php7.0-xmlrpc php-apcu
Si nécéssaire on installe apache2
apt-get install apache2
On reinsall php 7.0 avec les dépendances
apt-get install php php-mysql php-cgi php-cli php-ldap php-curl php-gd php-imap php-xmlrpc php-apcu php-mbstring php-xml
On pompe glpi
cd /var/www/html wget https://github.com/glpi-project/glpi/releases/download/9.2.1/glpi-9.2.1.tgz
On le décompresse
tar -xzvf glpi-9.2.1.tgz
On change le propriétaire et le groupe (pour effectuer l'installation)
chown -R www-data:www-data glpi
On met les droits à 777 (pour effectuer l'installation)
chmod -R 777 glpi
On se rend à l'adresse du serveur et on installe glpi
Après l'installation on rechange les droits
chmod -R 755 glpi
cd /var/www/html/glpi/plugins wget https://github.com/fusioninventory/fusioninventory-for-glpi/releases/download/glpi9.2%2B1.0/glpi-fusioninventory-9.2.1.0.tar.bz2 tar jxf glpi-fusioninventory-9.2.1.0.tar.bz2 chown -R www-data:www-data fusioninventory chmod -R 755 fusioninventory
Lorsque l'on clic sur le plugins FusionInventory
Le cron de GLPI ne fonctionne pas, voir documentation
On édite le crontab
crontab -e * * * * * /usr/bin/php7.0 /var/www/html/glpi/front/cron.php &>/dev/null /etc/init.d/cron restart
Plus de message d'erreur
Au préalable faire
apachectl restart
Infos : http://fusioninventory.org/documentation/
Installation des dependances
apt-get install dmidecode hwdata ucf hdparm perl libuniversal-require-perl libwww-perl libparse-edid-perl libproc-daemon-perl libfile-which-perl libxml-treepp-perl libyaml-perl libnet-cups-perl libnet-ip-perl libdigest-sha-perl libsocket-getaddrinfo-perl libtext-template-perl nmap libnet-snmp-perl libcrypt-des-perl libnet-nbname-perl libfile-copy-recursive-perl libparallel-forkmanager-perl
Download des agents (ils sont tous regroupés)
http://debian.fusioninventory.org/downloads/fusioninventory-agent_2.4-2_all.deb
Installation de l'agent
dpkg -i fusioninventory-agent_2.4-2_all.deb
Configuration de l'agent
nano /etc/fusioninventory/agent.cfg
Infos : http://fusioninventory.org/documentation/agent/man/agent.cfg.html
Pour lancer la tache :
directement:
pkill -USR1 -f -P 1 fusioninventory-agent
en service :
systemctl reload fusioninventory-agent
Et voila
… et si on faisait un p'tit script qui fait tout ca tout seul, a venir !