✅ 1. System Requirements & Packages
🔧 Install Apache, PHP, and MariaDB/MySQL:
sudo apt update
sudo apt install apache2 mariadb-server php php-mysql php-gd php-intl php-curl php-mbstring php-xml php-bz2 php-zip unzip wget
🔧 Enable the required Apache modules:
sudo a2enmod rewrite
sudo systemctl restart apache2
✅ 2. Download and Install GLPI
cd /tmp
wget https://github.com/glpi-project/glpi/releases/download/10.0.14/glpi-10.0.14.tgz
tar -xvzf glpi-10.0.14.tgz
sudo mv glpi /var/www/
sudo chown -R www-data:www-data /var/www/glpi
✅ 3. Apache Configuration
Create a configuration file for the VirtualHost:
sudo nano /etc/apache2/sites-available/glpi.conf
Paste the following:
<VirtualHost *:80>
ServerName glpi.localhost
DocumentRoot /var/www/glpi/public
<Directory /var/www/glpi/public>
Require all granted
AllowOverride All
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</Directory>
</VirtualHost>
Enable the site:
sudo a2ensite glpi.conf
sudo systemctl reload apache2
✅ 4. Edit /etc/hosts
Add this domain for local development:
sudo nano /etc/hosts
Add the following line:
127.0.0.1 glpi.localhost
✅ 5. Database Configuration
Start MySQL and create the database and user:
sudo mysql -u root -p
In the MySQL terminal:
CREATE DATABASE glpidb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'glpiuser'@'localhost' IDENTIFIED BY 'strongpassword';
GRANT ALL PRIVILEGES ON glpidb.* TO 'glpiuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
✅ 6. Access via Browser
Open your browser and go to:
http://glpi.localhost
You should see the GLPI installer 🎉
✅ Fixing the GLPI session.cookie_httponly
warning:
- Open the PHP configuration file:
Depending on your PHP version, the file might be:
sudo nano /etc/php/8.2/apache2/php.ini
Replace 8.2
with your actual version if different. You can check it with:
php -v
-
Search for the following line:
Press
Ctrl + W
and type:
session.cookie_httponly
- Edit or add the following line:
session.cookie_httponly = On
Save and exit (
Ctrl + O
, thenEnter
, thenCtrl + X
)Restart Apache to apply the changes:
sudo systemctl restart apache2
✅ Verification
To make sure the directive is applied:
php -i | grep session.cookie_httponly
You should see:
session.cookie_httponly => On => On
Top comments (0)