GLPI is a free and open-source IT Asset management software that can be installed on Ubuntu and Debian. This brief guide will teach you how to install GLPI’s latest version on the aforementioned operating system.
A GLPI with a lower version should be installed with PHP 7.4 or larger.
Step 1 Backup Database of the GLPI
It’s important to back up your current GLPI installation, including the database and configuration files. This ensures you can revert to the previous version if something goes wrong during the upgrade. Use the following command to backup glpi database to the home directory:
sudo mysqldump -uroot -p glpi_db > /home/user/glpi-database.sql
Replace glpi_db with your database name. Now verify the backup file using the following command:
Step 2 Backup GLPI Directory
Go to the GLPI installation directory using the following command:
Now back up the GLPI directory using the following command:
sudo mv glpi glpi-backup_9.5.12
glpi-backup_9.5.12 is the name of our Glpi backup.
Step 3 Download and Upgrade GLPI
Before upgrading, ensure your server meets the minimum system requirements for the latest version of GLPI. Download the latest version of GLPI from the official website. Make sure to download the latest stable version for your operating system by clicking the Download button.
Before upgrading, you must stop the Apache and MySQL services to prevent any interference during the upgrade process.
sudo systemctl apache2 stop
sudo systemctl mysql stop
You can also download the latest version of the GLPI using the following command on the terminal.
sudo wget -0 glpi.tgz https://github.com/glpi-project/glpi/releases/download/10.0.6/glpi-10.0.6.tgz%20
Now extract the downloaded GLPI archive using the following command:
sudo tar -xvf glpi.tgz
Now you’d need to change the ownership and permission of the GLPI files and directories to the Apache user using the following commands:
sudo chown -R www-data:www-data glpi
sudo chmod -R 755 glpi
Restart the Apache and MySQL services to apply the changes.
sudo systemctl restart apache2
sudo systemctl restart mysql
Now you can upgrade the GLPI to the latest version through front-end setup or using the terminal. Navigate to the GLPI installation directory and run the upgrade script.
sudo -u www-data php bin/console glpi:database:update
This will upgrade your GLPI installation to the latest version. You can also clear the cache to ensure that the latest version of GLPI is being used.
sudo -u www-data php bin/console cache:clear
Certain warnings appear when you install or upgrade GLPI. Go to the glpi directory and remove the Install.php file using the following commands:
sudo rm -fr install/install.php
By following this comprehensive guide, you can successfully upgrade GLPI IT Asset Manager to the latest version on your Ubuntu/Debian system.