DebianDebian Based

How To Install GLPI on Debian 13

Install GLPI on Debian 13

Installing GLPI (Gestionnaire Libre de Parc Informatique) on Debian 13 provides organizations with a powerful, open-source IT asset and service management solution. This comprehensive guide walks you through every step of the installation process, from system preparation to post-installation optimization.

What is GLPI? Understanding the Software

GLPI stands as one of the most robust IT asset management platforms available today. This open-source software solution delivers comprehensive functionality for tracking hardware inventory, managing helpdesk tickets, and maintaining detailed asset lifecycles.

The platform excels in several key areas: asset management, helpdesk operations, and inventory tracking. Organizations utilize GLPI to maintain complete visibility over their IT infrastructure, from computers and network equipment to software licenses and service contracts.

What sets GLPI apart from commercial alternatives is its open-source nature and active community support. The software provides enterprise-level features without licensing costs, making it ideal for businesses of all sizes. Companies frequently implement GLPI to centralize their IT management processes, streamline support workflows, and ensure compliance with asset tracking requirements.

System Requirements and Prerequisites

Hardware Requirements

Before installing GLPI on Debian 13, ensure your system meets the minimum specifications. A dual-core processor with at least 2GB RAM provides adequate performance for small deployments. However, production environments handling substantial asset databases benefit from 4GB RAM or more.

Storage requirements depend on your asset database size and retention policies. Plan for at least 10GB free space initially, with room for growth as your asset inventory expands.

Software Prerequisites

GLPI installation requires several core components working together. The Apache web server serves as the primary web platform. MariaDB or MySQL provides database functionality for storing asset information, user accounts, and system configuration.

PHP version 7.4 or higher is essential, along with specific extensions including php-gd, php-mysql, php-ldap, php-xml, php-mbstring, and php-curl. These extensions enable GLPI’s full feature set, from database connectivity to image processing capabilities.

Access Requirements

Administrative access through root or sudo privileges is mandatory for system-level configuration changes. Network access allows downloading GLPI packages and dependencies. Production deployments should consider firewall configuration and SSL certificate implementation for secure remote access.

Step 1: Preparing Debian 13 System

System Update Process

Begin by updating your Debian 13 system to ensure all packages reflect the latest security patches and improvements. Execute the following commands:

sudo apt update
sudo apt upgrade -y

The update process refreshes package repositories, while the upgrade command installs available updates. This foundation ensures compatibility with GLPI dependencies and eliminates potential conflicts from outdated system components.

Installing Core Dependencies

Install the essential software stack required for GLPI operation:

sudo apt install apache2 mariadb-server php php-mysql php-gd php-ldap php-xml php-mbstring php-curl php-zip php-intl php-bz2 php-cli php-common php-json -y

This command installs Apache2 web server, MariaDB database server, and all necessary PHP extensions. Each package serves a specific purpose in the GLPI ecosystem, from web serving to database operations and image processing.

Enabling Required Services

Start and enable services to ensure they launch automatically during system boot:

sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl start mariadb
sudo systemctl enable mariadb

Verify service status with systemctl status apache2 and systemctl status mariadb to confirm proper operation before proceeding.

Step 2: Configuring Apache Web Server

Basic Apache Configuration

Apache configuration for GLPI requires specific settings to ensure optimal performance and security. The default Apache installation provides a solid foundation, but GLPI benefits from customized virtual host configuration.

Create a dedicated configuration file for GLPI to isolate its settings from other web applications. This approach simplifies maintenance and troubleshooting while providing clear separation of concerns.

Enabling Required Apache Modules

Enable essential Apache modules that GLPI requires for full functionality:

sudo a2enmod rewrite
sudo a2enmod php8.2
sudo systemctl restart apache2

The mod_rewrite module enables URL rewriting for GLPI’s clean URLs. The PHP module ensures proper PHP script execution within the Apache environment.

Creating GLPI Virtual Host

Create a new virtual host configuration file:

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

Add the following configuration:

<VirtualHost *:80>
    ServerName your-domain.com
    DocumentRoot /var/www/html/glpi
    
    <Directory /var/www/html/glpi>
        AllowOverride All
        Require all granted
    </Directory>
    
    ErrorLog ${APACHE_LOG_DIR}/glpi_error.log
    CustomLog ${APACHE_LOG_DIR}/glpi_access.log combined
</VirtualHost>

Enable the site configuration:

sudo a2ensite glpi.conf
sudo systemctl reload apache2

This virtual host configuration directs Apache to serve GLPI from the /var/www/html/glpi directory. The AllowOverride All directive permits GLPI’s .htaccess files to function properly for URL rewriting and security settings.

Step 3: Database Setup and Configuration

Securing MariaDB Installation

Secure your MariaDB installation by running the security script:

sudo mysql_secure_installation

Follow the prompts to set a root password, remove anonymous users, disable remote root login, and delete test databases. These security measures protect your database from unauthorized access and potential security vulnerabilities.

Choose a strong root password combining uppercase letters, lowercase letters, numbers, and special characters. Document this password securely as it’s required for database administration tasks.

Creating GLPI Database

Connect to MariaDB as the root user:

sudo mysql -u root -p

Create a dedicated database for GLPI with appropriate character encoding:

CREATE DATABASE glpi CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

The UTF8MB4 character set ensures proper support for international characters and emoji, which may appear in asset descriptions or user comments.

Database User Management

Create a dedicated user account for GLPI database operations:

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

Replace strong_password_here with a secure password different from your root password. This dedicated user account follows the principle of least privilege, limiting database access to only what GLPI requires.

Test the database connection:

mysql -u glpiuser -p glpi

Successful connection confirms proper user creation and database access.

Step 4: Downloading and Installing GLPI

Getting Latest GLPI Version

Download the latest stable GLPI release from the official repository. Check the current version on the GLPI GitHub releases page:

cd /tmp
wget https://github.com/glpi-project/glpi/releases/download/10.0.19/glpi-10.0.19.tgz

Verify the download integrity by checking the file size matches the expected value from the download page. This step ensures you received a complete, uncorrupted package.

Extracting and Positioning Files

Extract the downloaded archive and move files to the web directory:

tar -xzf glpi-10.0.19.tgz
sudo mv glpi /var/www/html/

This process places GLPI files in the web server’s document root. The extraction creates a complete directory structure containing all necessary GLPI components.

Setting File Permissions

Configure proper ownership and permissions for GLPI files:

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

These permissions allow the Apache web server to read GLPI files while maintaining security. The www-data user and group represent the Apache service account on Debian systems.

Set specific permissions for sensitive directories:

sudo chmod -R 770 /var/www/html/glpi/files
sudo chmod -R 770 /var/www/html/glpi/config

Step 5: PHP Configuration and Optimization

Required PHP Extensions

Verify all required PHP extensions are installed and enabled:

php -m | grep -E "gd|mysql|ldap|xml|mbstring|curl|zip|intl|bz2"

Each extension serves specific GLPI functionality. The gd extension handles image processing for uploaded photos and diagrams. MySQL extension provides database connectivity. LDAP extension enables directory service integration for user authentication.

If any extensions are missing, install them individually:

sudo apt install php-extension-name

PHP Configuration Tuning

Edit the PHP configuration file for optimal GLPI performance:

sudo nano /etc/php/8.3/apache2/php.ini

Modify these critical settings:

memory_limit = 256M
max_execution_time = 300
post_max_size = 64M
upload_max_filesize = 64M
session.cookie_httponly = On
session.use_strict_mode = On

These settings accommodate GLPI’s memory requirements and file upload needs. The memory limit ensures complex operations complete successfully. Execution time allows for database-intensive operations. Upload limits support document attachments and asset images.

Restart Apache to apply PHP configuration changes:

sudo systemctl restart apache2

Step 6: Running GLPI Web Installation

Accessing Installation Wizard

Open your web browser and navigate to your GLPI installation:

http://your-server-ip/glpi

The GLPI installation wizard guides you through the setup process. Select your preferred language and review the license agreement before proceeding.

Install GLPI on Debian 13

Database Configuration

Enter your database connection details in the installation wizard:

  • Database Server: localhost
  • Database Name: glpi
  • Username: glpiuser
  • Password: your_database_password

Click “Test Connection” to verify database connectivity. Successful connection enables the wizard to proceed with database initialization. The installer creates necessary tables and populates them with default configuration data.

Initial Setup Completion

The installation wizard creates default user accounts for different access levels:

  • glpi/glpi – Administrator account
  • tech/tech – Technician account
  • normal/normal – Standard user account
  • post-only/postonly – Self-service account

Change these default passwords immediately after initial login for security. The installation completes with a summary of created accounts and next steps for system configuration.

Step 7: Post-Installation Configuration

Security Hardening

Immediately change all default passwords to prevent unauthorized access. Log in with the administrator account (glpi/glpi) and navigate to Administration > Users to update passwords for all default accounts.

Remove or disable unused default accounts. Most organizations only require the administrator account and specific user accounts for their environment.

Secure the installation by removing the install directory:

sudo rm -rf /var/www/html/glpi/install

This prevents potential security issues from leaving installation files accessible.

Basic GLPI Configuration

Access the GLPI administration panel and configure essential settings:

  1. General Setup: Configure organization name, time zone, and language preferences
  2. Email Notifications: Set up SMTP settings for automated notifications
  3. Authentication: Configure user authentication methods (local, LDAP, Active Directory)
  4. Inventory Settings: Define asset categories and fields relevant to your organization

Navigate to Setup > General to access these configuration options. Proper initial configuration establishes a foundation for effective asset management.

Performance Optimization

Configure caching options to improve GLPI performance:

sudo nano /var/www/html/glpi/config/config_db.php

Enable caching features appropriate for your environment size. Larger deployments benefit from external caching solutions like Redis or Memcached.

Step 8: Installing and Configuring GLPI Agent

Understanding GLPI Agent

The GLPI Agent automatically collects hardware and software inventory information from client systems. This agent replaces the older FusionInventory agent, providing improved reliability and features.

Agent deployment enables automated asset discovery and maintains up-to-date inventory information without manual intervention. Organizations typically install agents on all managed computers to ensure complete asset visibility.

Agent Installation Process

Download the GLPI Agent from the official repository:

wget https://github.com/glpi-project/glpi-agent/releases/download/1.5/glpi-agent_1.5-1_all.deb
sudo dpkg -i glpi-agent_1.5-1_all.deb
sudo apt install -f

Configure the agent to communicate with your GLPI server:

sudo nano /etc/glpi-agent/agent.cfg

Add your GLPI server URL:

server = http://your-glpi-server/glpi/front/inventory.php

Agent Configuration and Testing

Start and enable the GLPI Agent service:

sudo systemctl start glpi-agent
sudo systemctl enable glpi-agent

Test agent functionality by running a manual inventory:

sudo glpi-agent --force

Verify inventory data appears in your GLPI web interface under Assets > Computers. Successful agent operation automatically updates asset information according to the configured schedule.

Troubleshooting Common Issues

Database Connection Problems

Database connectivity issues frequently stem from incorrect credentials or service configuration. Verify MariaDB service status:

sudo systemctl status mariadb

Test database connection manually:

mysql -u glpiuser -p glpi

Check GLPI error logs for specific database error messages:

sudo tail -f /var/www/html/glpi/files/_log/php-errors.log

Web Server Issues

Apache configuration problems often manifest as 403 Forbidden or 500 Internal Server errors. Check Apache error logs:

sudo tail -f /var/log/apache2/error.log

Verify file permissions on the GLPI directory:

ls -la /var/www/html/glpi

Ensure the www-data user owns all GLPI files and directories.

Performance and Access Issues

Slow GLPI performance may indicate insufficient PHP memory limits or database optimization needs. Monitor system resources during peak usage:

htop

Check PHP error logs for memory limit warnings:

sudo tail -f /var/log/apache2/error.log | grep memory

Network access issues require firewall configuration review. Ensure port 80 (or 443 for HTTPS) allows incoming connections from client networks.

Security Best Practices

System Security

Maintain system security through regular updates:

sudo apt update && sudo apt upgrade

Configure a firewall to restrict access to necessary ports only:

sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable

Implement SSL/TLS certificates for production deployments to encrypt data transmission. Let’s Encrypt provides free certificates suitable for most organizations.

GLPI-Specific Security

Regular password policy enforcement prevents unauthorized access. Configure GLPI password requirements under Setup > Authentication > Password Policy.

Implement role-based access control by creating custom user profiles matching your organizational structure. Limit user permissions to only necessary functions for their job responsibilities.

Establish backup procedures for both the GLPI database and file system:

sudo mysqldump -u glpiuser -p glpi > glpi_backup_$(date +%Y%m%d).sql
sudo tar -czf glpi_files_backup_$(date +%Y%m%d).tar.gz /var/www/html/glpi/files

Configure log monitoring to detect suspicious activities or system issues. GLPI logs user actions and system events for security auditing purposes.

Congratulations! You have successfully installed GLPI. Thanks for using this tutorial for installing GLPI on Debian 13 “Trixie” system. For additional help or useful information, we recommend you check the official GLPI website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button