====== installatie======
[[glpi:glpi|{{ :glpi:icon.jpg?120|}}]]
===== context=====
dit document beschrijft de installatie van gLPI op Debian12.
===== stappenplan=====
* werk het OS bij: apt update && apt upgrade -y
* installer Apache, MariaDB, PHP, de nodige extenties:
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
* open ''/etc/php/8.2/cli/php.ini''
* haal onderstaande entry __uit commentaar__:'';cgi.fix_pathinfo=1''
* stel tijdzone: ''date.timezone = Europe/Brussels''
* herstart Apache: systemctl restart apache2
* maak een database aan voor gLPI: 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;
* download [[https://www.glpi-project.org/en/downloads/|gLPI]] naar ''/var/www/html''
* pak tar bestand uit: tar -xvzf glpi-.tgz
* pas te toegangsrechten aan voor de webservier gebruiker: chown -R www-data:www-data /var/www/html/glpi
chmod -R 755 /var/www/html/glpi
* maak een virtual host aan op Apache:vi /etc/apache2/sites-available/glpi.confmet onderstaande inhoud:
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"
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]
was ook nodig, maar weet niet zeker waarom: rm -f /etc/apache2/sites-available/000-default.conf default-ssl.conf
* activeer deze host: a2ensite glpi.conf
a2enmod rewrite
systemctl restart apache2
* open http:///glpi evn doorloop de wizard.
===== meer info =====
[[https://glpi-install.readthedocs.io/en/latest/|gLPI KB]]
{{tag>glpi}}