dit document beschrijft de installatie van gLPI op Debian12.
apt update && apt upgrade -y
apt install -y apache2 mariadb-server unzip wget php php-bcmath php-cli php-common php-curl php-gd php-xml php-mbstring php-ldap php-imap php-intl php-zip php-bz2 php-mysql php-apcu php-xmlrpc php-cas php-ldap php-opcache
/etc/php/8.2/cli/php.ini ;cgi.fix_pathinfo=1date.timezone = Europe/Brusselssystemctl restart apache2
mysql CREATE DATABASE glpidb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'glpiuser'@'localhost' IDENTIFIED BY 'StrongPasswordHere'; GRANT ALL PRIVILEGES ON glpidb.* TO 'glpiuser'@'localhost'; FLUSH PRIVILEGES; EXIT;
/var/www/htmltar -xvzf glpi-<versie>.tgz
chown -R www-data:www-data /var/www/html/glpi chmod -R 755 /var/www/html/glpi
vi /etc/apache2/sites-available/glpi.conf
met onderstaande inhoud:
<VirtualHost *:80>
ServerName glpi.legoland.net
DocumentRoot /var/www/html/glpi/public
# If you want to place GLPI in a subfolder of your site (e.g. your virtual host is serving multiple applications),
# you can use an Alias directive. If you do this, the DocumentRoot directive MUST NOT target the GL PI directory itself.
# DocumentRoot /var/www/html
# Alias "/glpi" "/var/www/glpi/public"
<Directory /var/www/html/glpi/public>
Require all granted
RewriteEngine On
# Ensure authorization headers are passed to PHP.
# Some Apache configurations may filter them and break usage of API, CalDAV, ...
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect all requests to GLPI router, unless file exists.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</Directory>
</VirtualHost>
Warning: was ook nodig, maar weet niet zeker waarom:
rm -f /etc/apache2/sites-available/000-default.conf default-ssl.conf
a2ensite glpi.conf a2enmod rewrite systemctl restart apache2