AlmaLinuxRHEL Based

How To Install GLPI on AlmaLinux 10

Install GLPI on AlmaLinux 10

Managing IT assets, tracking hardware inventory, and maintaining an efficient helpdesk system are critical challenges for modern organizations. GLPI (Gestionnaire Libre de Parc Informatique) offers a comprehensive, open-source solution that combines IT asset management with powerful service desk capabilities. This tutorial demonstrates how to install GLPI on AlmaLinux 10, providing a robust platform for IT infrastructure management.

AlmaLinux 10 serves as an ideal hosting platform for GLPI deployments. As a community-driven, enterprise-grade Linux distribution that maintains binary compatibility with Red Hat Enterprise Linux, AlmaLinux delivers the stability and security required for production environments. The combination of GLPI’s extensive feature set with AlmaLinux’s reliability creates a powerful solution for organizations seeking to streamline their IT operations.

By following this comprehensive guide, system administrators will successfully deploy a fully functional GLPI instance on AlmaLinux 10. The installation process covers everything from initial system preparation through post-installation security hardening and optimization.

What is GLPI?

GLPI originated as a French open-source project designed to provide organizations with complete visibility into their IT infrastructure. The software has evolved into a mature ITIL-compatible IT Service Management (ITSM) platform used by thousands of organizations worldwide.

The platform excels at IT asset management, enabling administrators to track hardware components, software licenses, network devices, and peripherals from a centralized interface. GLPI’s helpdesk functionality supports incident management, change requests, problem tracking, and project management workflows. The integrated dashboard provides real-time visibility into asset utilization, ticket status, and financial data.

Financial management capabilities within GLPI allow organizations to track asset costs, depreciation schedules, supplier contracts, and budget allocations. This comprehensive approach connects technical asset management with financial planning and reporting. GLPI Agent extends the platform’s capabilities by automatically discovering and inventorying assets across Windows, Linux, macOS, and Android systems.

Understanding AlmaLinux 10

AlmaLinux emerged as a community-driven replacement for CentOS following Red Hat’s decision to discontinue CentOS as a RHEL clone. The AlmaLinux OS Foundation maintains this free, enterprise-grade Linux distribution with full binary compatibility to Red Hat Enterprise Linux.

AlmaLinux 10 represents the latest stable release, offering long-term support and regular security updates. The distribution supports multiple architectures including x86-64, ARM64, PowerPC, and IBM Z, making it suitable for diverse hardware environments. Enterprise organizations trust AlmaLinux for production workloads due to its stability, security patches, and predictable release cycles.

The platform’s compatibility with RHEL ensures that applications, scripts, and configurations designed for Red Hat environments work seamlessly on AlmaLinux. This compatibility extends to package repositories, system libraries, and administrative tools.

Prerequisites and System Requirements

Hardware Requirements

Small GLPI deployments supporting 10-50 users require a minimum of 2 CPU cores, 4GB RAM, and 20GB disk storage. Medium organizations with 50-200 users should allocate 4 CPU cores, 8GB RAM, and 50GB disk space. Large enterprises managing thousands of assets need more substantial resources, including 8+ CPU cores, 16GB+ RAM, and 100GB+ storage capacity.

All deployments require 64-bit processors with x86_64 architecture support. Storage requirements scale with the number of assets tracked, users supported, and ticket history retained.

Software Requirements

The installation requires a fresh AlmaLinux 10 system with root or sudo privileges. Network connectivity enables package downloads from official repositories. Organizations planning public access should configure a domain name or static IP address before beginning installation.

GLPI Software Stack Requirements

GLPI operates on the classic LAMP (Linux, Apache, MySQL/MariaDB, PHP) stack. Apache HTTP Server 2.4 or newer provides web serving capabilities, though Nginx represents a viable alternative for high-performance requirements. PHP versions 7.4 through 8.3 are supported, with PHP 8.0 or newer recommended for optimal performance and security.

Database support includes MariaDB 10.2 or newer and MySQL 5.7 or newer. MariaDB typically delivers better performance for GLPI workloads. Required PHP extensions include curl, gd, intl, mysqli, session, zlib, dom, fileinfo, json, simplexml, and xmlreader. Optional extensions like ldap, openssl, bz2, zip, and Zend OPcache enhance functionality and performance.

Step 1: Update AlmaLinux 10 System

System updates ensure all packages reflect the latest security patches and bug fixes. Execute the following command to update the system:

sudo dnf update -y

The DNF package manager downloads and installs available updates across all installed packages. Kernel updates require a system reboot to take effect. Check for kernel updates using:

sudo dnf list updates kernel

Reboot the system if kernel updates were installed:

sudo reboot

Verify the AlmaLinux version after reboot:

cat /etc/os-release

The output should confirm AlmaLinux 10 as the operating system.

Step 2: Install Apache Web Server

Apache HTTP Server handles web requests for the GLPI interface. Install Apache with:

sudo dnf install httpd -y

Start the Apache service immediately:

sudo systemctl start httpd

Configure Apache to launch automatically during system boot:

sudo systemctl enable httpd

Verify Apache is running correctly:

sudo systemctl status httpd

A green “active (running)” status indicates successful operation. Configure the firewall to permit HTTP and HTTPS traffic:

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload

These commands permanently enable web traffic through the AlmaLinux firewall and reload the configuration to apply changes. Test Apache by navigating to the server’s IP address in a web browser. The default Apache welcome page confirms successful installation.

Step 3: Install and Configure MariaDB Database

MariaDB provides the relational database backend for GLPI data storage. Install MariaDB server:

sudo dnf install mariadb-server -y

Start the MariaDB service:

sudo systemctl start mariadb

Enable MariaDB to start on boot:

sudo systemctl enable mariadb

Secure the MariaDB installation by running the security script:

sudo mysql_secure_installation

The script prompts for several security configurations. Press Enter when asked about the current root password (none exists initially). Set a strong root password when prompted. Answer “Y” to remove anonymous users, disable remote root login, remove the test database, and reload privilege tables.

Create a dedicated database and user for GLPI. Log into MariaDB:

sudo mysql -u root -p

Enter the root password set during the security script. Execute the following SQL commands:

CREATE DATABASE glpidb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'glpi_user'@'localhost' IDENTIFIED BY 'StrongPassword123!';
GRANT ALL PRIVILEGES ON glpidb.* TO 'glpi_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Replace “StrongPassword123!” with a secure password containing uppercase letters, lowercase letters, numbers, and special characters. The CHARACTER SET and COLLATE specifications ensure proper Unicode support for international characters.

Step 4: Install PHP and Required Extensions

GLPI requires PHP and numerous extensions for full functionality. Enable the EPEL repository first:

sudo dnf install epel-release -y

Install the Remi repository for access to newer PHP versions:

sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-10.rpm -y

List available PHP module streams:

sudo dnf module list php

Enable PHP 8.1 (recommended for GLPI 10):

sudo dnf module enable php:remi-8.4 -y

Install PHP with all required and recommended extensions:

sudo dnf install php php-mysqlnd php-gd php-intl php-curl php-mbstring php-xml php-cli php-ldap php-openssl php-xmlrpc php-zip php-bz2 php-apcu php-opcache php-json php-imap php-soap -y

This command installs PHP core along with extensions for database connectivity, image processing, internationalization, LDAP authentication, compression, caching, and SOAP services.

Verify PHP installation:

php -v

Check installed PHP modules:

php -m

The output lists all active PHP extensions. Configure PHP settings for optimal GLPI performance. Edit the PHP configuration file:

sudo nano /etc/php.ini

Locate and modify the following directives:

max_execution_time = 180
memory_limit = 256M
post_max_size = 50M
upload_max_filesize = 50M
session.cookie_httponly = On
date.timezone = Asia/Jakarta

Adjust the timezone setting to match the server location. These settings ensure GLPI can handle large file uploads, process complex operations, and maintain secure session cookies.

Restart Apache to load PHP:

sudo systemctl restart httpd

Step 5: Download and Extract GLPI

Navigate to a temporary directory:

cd /tmp

Download the latest GLPI release from GitHub. Visit the GLPI releases page to identify the current version. Download GLPI 10.0.18 (adjust version as needed):

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

Extract the archive to Apache’s web root directory:

sudo tar -xzf glpi-10.0.18.tgz -C /var/www/html/

The extraction creates a /var/www/html/glpi directory containing the application files. Set appropriate ownership for the Apache user:

sudo chown -R apache:apache /var/www/html/glpi

Configure directory permissions:

sudo chmod -R 755 /var/www/html/glpi

These permissions allow Apache to read and execute files while preventing unauthorized modifications.

Step 6: Configure Apache Virtual Host for GLPI

GLPI 10 introduced a security-enhanced directory structure with a separate public directory. Create an Apache virtual host configuration:

sudo nano /etc/httpd/conf.d/glpi.conf

Add the following configuration:

<VirtualHost *:80>
    ServerName glpi.example.com
    DocumentRoot /var/www/html/glpi/public

    <Directory /var/www/html/glpi/public>
        Require all granted
        RewriteEngine On
        
        # Authorization header
        RewriteCond %{HTTP:Authorization} ^(.+)$
        RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
        
        # Redirect all requests to index.php
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php [QSA,L]
    </Directory>

    ErrorLog /var/log/httpd/glpi_error.log
    CustomLog /var/log/httpd/glpi_access.log combined
</VirtualHost>

Replace “glpi.example.com” with the actual domain name or server IP address. The DocumentRoot points to the public directory, isolating sensitive GLPI files from web access.

Enable the Apache rewrite module if not already active:

sudo dnf install mod_rewrite -y

Test the Apache configuration syntax:

sudo httpd -t

A “Syntax OK” message confirms valid configuration. Restart Apache to apply changes:

sudo systemctl restart httpd

Step 7: Configure SELinux for GLPI

Security-Enhanced Linux (SELinux) provides mandatory access control on AlmaLinux. Check SELinux status:

sestatus

Install SELinux management tools:

sudo dnf install policycoreutils-python-utils -y

Set the appropriate SELinux context for GLPI directories:

sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/glpi(/.*)?"
sudo restorecon -Rv /var/www/html/glpi

These commands label GLPI files with contexts allowing Apache read/write access. Enable SELinux booleans for network database connections:

sudo setsebool -P httpd_can_network_connect on
sudo setsebool -P httpd_can_network_connect_db on

The -P flag makes these settings permanent across reboots. Verify SELinux contexts:

ls -lZ /var/www/html/glpi

Step 8: Complete GLPI Web-Based Installation

Open a web browser and navigate to the GLPI installation URL:

http://your-server-ip/glpi

Or use the configured domain name:

http://glpi.example.com

The GLPI installation wizard launches automatically.

Install GLPI on AlmaLinux 10

Language Selection

Select the preferred language for the installation interface and click Continue.

License Agreement

Review the GNU General Public License and click Continue to accept the terms.

Installation Type

Select “Install” to begin a fresh GLPI installation.

System Requirements Check

The wizard validates server requirements, checking PHP version, required extensions, and file permissions. Green checkmarks indicate met requirements. Orange warnings for optional extensions don’t prevent installation but may limit functionality. Click Continue if all mandatory requirements show green.

Database Connection

Enter the database configuration details:

  • SQL Server: localhost
  • SQL User: glpi_user
  • SQL Password: The password set during database creation

Click Continue to test the connection.

Database Selection

Select “glpidb” from the database dropdown and click Continue.

Database Initialization

GLPI automatically creates the necessary database tables and populates initial data. This process takes several minutes. Wait for completion before proceeding.

Usage Statistics

Choose whether to send anonymous usage statistics to the GLPI development team. This optional setting helps improve the software.

Installation Complete

The wizard displays a summary confirming successful installation. Note the default login credentials:

  • Administrator: glpi / glpi
  • Technician Account: tech / tech
  • Normal User: normal / normal
  • Post-only User: postonly / postonly

These default accounts enable different permission levels for testing.

Step 9: Post-Installation Security Configuration

Security hardening prevents unauthorized access and protects sensitive data. Remove the installation script immediately:

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

This deletion prevents reinstallation attempts that could overwrite the database.

Log into GLPI using the glpi/glpi credentials. Navigate to Administration > Users and change the administrator password immediately. Create a new administrative account with a unique username and strong password. Disable or delete the default accounts (tech, normal, postonly) after creating appropriate replacement accounts.

Configure session timeout in Administration > Setup > General. Set an appropriate timeout period (15-30 minutes) for inactive sessions. Enable password complexity requirements under Administration > Setup > Authentication to enforce strong passwords.

Establish a backup strategy for both the GLPI database and the files directory. Schedule regular automated backups using cron jobs:

#!/bin/bash
DATE=$(date +%Y%m%d_%H%M%S)
mysqldump -u glpi_user -p'YourPassword' glpidb | gzip > /backup/glpi_db_$DATE.sql.gz
tar -czf /backup/glpi_files_$DATE.tar.gz /var/www/html/glpi/files

Save this script and configure cron to execute it daily.

Step 10: Install SSL Certificate (Optional but Recommended)

HTTPS encryption protects authentication credentials and sensitive data transmitted between browsers and the GLPI server. Install Certbot for Let’s Encrypt SSL certificates:

sudo dnf install certbot python3-certbot-apache -y

Obtain an SSL certificate for the domain:

sudo certbot --apache -d glpi.example.com

Certbot automatically configures Apache for HTTPS and sets up automatic certificate renewal. Test the renewal process:

sudo certbot renew --dry-run

Update the PHP configuration to require secure cookies:

sudo nano /etc/php.ini

Set:

session.cookie_secure = On

Restart Apache:

sudo systemctl restart httpd

Access GLPI through HTTPS to verify SSL configuration.

Configuring GLPI Agent for Inventory Management

GLPI Agent automates asset discovery and inventory collection across the network. Download GLPI Agent installers from the official GLPI website for target operating systems.

For Windows systems, download the .exe installer and execute it on workstations. Configure the agent with the GLPI server URL during installation. Linux systems can install the agent via package managers or from source code.

Configure the agent’s inventory schedule in /etc/glpi-agent/agent.cfg (Linux) or through the Windows GUI. Set the server URL and collection frequency. Agents periodically contact the GLPI server to submit inventory data.

Verify agent communication in GLPI under Administration > Inventory. Successful connections display discovered assets automatically.

Essential GLPI Configuration After Installation

Access the GLPI administration panel using the administrator account. Navigate to Setup > General to configure basic settings including organization name, URL, and timezone.

Configure email notifications under Setup > Notifications > Email followups configuration. Enter SMTP server details, authentication credentials, and sender information to enable automated ticket notifications.

Create the organizational structure under Administration > Dropdowns. Define entities (organizational units), locations (physical sites), and departments to match the company structure. Entities enable multi-tenancy support for organizations with separate divisions or subsidiaries.

Configure user roles and permissions under Administration > Profiles. GLPI includes predefined profiles like Super-Admin, Admin, Technician, and User. Customize these profiles or create new ones matching organizational requirements.

Define asset categories under Assets > Types. Customize categories for computers, monitors, network devices, software, and other IT assets tracked by the organization. Configure status values (In use, Available, Retired) under Administration > Dropdowns > Status.

Set up helpdesk ticket categories, priorities, and assignment rules under Setup > Dropdowns. Categories organize tickets by type (hardware issue, software request, network problem), while priorities determine handling urgency.

Configure Service Level Agreements (SLAs) under Setup > SLAs. Define response times and resolution targets for different ticket priorities and categories. SLAs automatically escalate overdue tickets and generate management reports.

Troubleshooting Common Installation Issues

Database Connection Errors

Connection failures typically indicate incorrect credentials, MariaDB service issues, or firewall restrictions. Verify database credentials match those entered during setup. Check MariaDB service status:

sudo systemctl status mariadb

Restart MariaDB if stopped:

sudo systemctl restart mariadb

Test database connectivity manually:

mysql -u glpi_user -p glpidb

Successful connection confirms database access works.

PHP Extension Missing

The system requirements page identifies missing extensions. Install missing extensions using dnf:

sudo dnf install php-extension-name -y

Restart Apache after installing extensions:

sudo systemctl restart httpd

Refresh the GLPI installation page to recheck requirements.

Permission Denied Errors

Permission errors indicate incorrect file ownership or permissions. Verify Apache ownership:

sudo chown -R apache:apache /var/www/html/glpi

Set appropriate permissions:

sudo chmod -R 755 /var/www/html/glpi

Check specific directory permissions for the files, config, and marketplace directories.

SELinux Blocking Access

SELinux denials appear in audit logs. Check for denials:

sudo ausearch -m avc -ts recent

Review the output for denied operations. Apply appropriate contexts or enable required booleans based on the denial messages.

Blank Page After Installation

Blank pages often result from PHP errors. Enable error display temporarily:

sudo nano /etc/php.ini

Set:

display_errors = On
error_reporting = E_ALL

Restart Apache and reload the page to view error messages. Check Apache error logs:

sudo tail -f /var/log/httpd/error_log

GLPI’s internal logs provide additional debugging information:

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

These logs reveal specific errors causing failures.

Cannot Access Web Interface

Firewall rules commonly block access. Verify firewall allows HTTP/HTTPS:

sudo firewall-cmd --list-all

Add missing services if needed. Check Apache configuration and virtual host settings. Verify SELinux isn’t blocking connections using ausearch.

Session Issues

Session problems manifest as repeated logouts or authentication failures. Check session directory permissions:

sudo ls -ld /var/lib/php/session

Ensure Apache can write to the session directory. Review session settings in php.ini for proper configuration.

Performance Issues

Slow page loads indicate insufficient resources or missing optimizations. Enable PHP OPcache in php.ini:

opcache.enable=1
opcache.memory_consumption=128
opcache.max_accelerated_files=10000

Configure APCu caching:

apc.enabled=1
apc.shm_size=64M

Tune MariaDB settings in /etc/my.cnf.d/mariadb-server.cnf:

[mysqld]
innodb_buffer_pool_size=1G
query_cache_size=32M

Restart services after configuration changes.

Performance Optimization Tips

PHP OPcache dramatically improves performance by caching compiled PHP code in memory. Monitor OPcache effectiveness through the PHP info page or dedicated monitoring tools.

APCu provides user-level caching for application data. GLPI leverages APCu when available to cache database queries and configuration data.

MariaDB tuning focuses on the InnoDB buffer pool size, which should consume 70-80% of available RAM on dedicated database servers. Query cache helps with repetitive queries common in GLPI workloads.

GLPI requires cron jobs for background tasks including email notifications, inventory processing, and scheduled reports. Configure cron using the system crontab:

sudo crontab -e

Add:

*/5 * * * * php /var/www/html/glpi/front/cron.php &>/dev/null

This executes GLPI maintenance tasks every 5 minutes.

Regular database optimization prevents table fragmentation. Schedule monthly optimization:

mysqlcheck -u root -p --optimize glpidb

Monitor server resources using tools like htop, iotop, and sar. Track CPU usage, memory consumption, disk I/O, and network traffic to identify bottlenecks.

High-traffic environments benefit from Redis session storage instead of file-based sessions. Install Redis:

sudo dnf install redis php-redis -y
sudo systemctl enable --now redis

Configure PHP to use Redis for sessions in php.ini:

session.save_handler = redis
session.save_path = "tcp://127.0.0.1:6379"

Restart Apache to apply changes.

Congratulations! You have successfully installed GLPI. Thanks for using this tutorial for installing GLPI on AlmaLinux OS 10 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