Introduction

GLPI is an open-source IT asset management software used for managing resources and tracking assets. This guide will walk you through the process of installing GLPI on Debian 12.

Prerequisites

Before you begin, ensure you have:

  1. A Debian 12 server or desktop system
  2. Root or sudo privileges

Step 1: Install Apache, MariaDB, and PHP

Update the package index and install Apache, MariaDB, and PHP:

sudo apt update
sudo apt install -y apache2 mariadb-server php php-mysql libapache2-mod-php php-gd php-ldap php-xml php-mbstring php-curl php-json

Step 2: Secure MariaDB Installation

Run the MySQL/MariaDB security script to secure the installation:

sudo mysql_secure_installation

Step 3: Create Database and User for GLPI

Login to MySQL/MariaDB:

sudo mysql -u root -p

Create a database for GLPI:

CREATE DATABASE glpidb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Create a user and grant privileges:

CREATE USER 'glpiuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON glpidb.* TO 'glpiuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 4: Download and Extract GLPI

Download the latest version of GLPI from the official website or GitHub repository:

wget https://github.com/glpi-project/glpi/releases/download/9.6.0/glpi-9.6.0.tgz

Extract the downloaded archive:

tar -xzf glpi-9.6.0.tgz

Step 5: Move GLPI Files to Apache Document Root

Move the extracted GLPI files to the Apache document root:

sudo mv glpi /var/www/html/

Step 6: Set Permissions

Set the correct permissions for GLPI:

sudo chown -R www-data:www-data /var/www/html/glpi
sudo chmod -R 755 /var/www/html/glpi

Step 7: Configure Apache

Create a new Apache configuration file for GLPI:

sudo nano /etc/apache2/sites-available/glpi.conf

Add the following content to the file:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/glpi
    ServerName example.com

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/html/glpi>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Enable the new Apache configuration:

sudo a2ensite glpi.conf

Restart Apache for the changes to take effect:

sudo systemctl restart apache2

Step 8: Complete Installation

Access GLPI in your web browser by navigating to http://your_server_ip/glpi. Follow the on-screen instructions to complete the installation.

Conclusion

Congratulations! You have successfully installed GLPI IT Inventory Management on Debian 12. You can now use GLPI to manage your IT assets and resources.

Was this answer helpful? 0 Users Found This Useful (0 Votes)