Install GLPI on Debian 3.1 (Sarge)

Original version by Aurel (based on JMD document)

We now consider you a fully functionnal Debian installed. Debian version used in this documentation is Sarge, considered as latest stable version.

Apache, PHP and MySQL installation

First of all, install the Apache Web server ( ). As GLPI is written in PHP, you need to install the PHP Apache module.

As super-user (« root »), enter the following commands (next command are supposed to be executed as super-user) :

Debian:~# apt-get install apache2 php4 libapache2-mod-php4

A serie of questions will be asked : answer yes to all to perform the installation.

GLPI works with a MySQL ( ) databse. You need to install the mysql-server and associated PHP libraries :

Debian:~# apt-get install mysql-server php4-mysql

You now ca, start the two installed servers, Apache and MySQL :

Debian:~# /etc/init.d/apache2 restart
Debian:~# /etc/init.d/mysql restart

All softwares needed by GLPI are now installed. However, some installation steps are still missing.

  • a password for MySQL root (it is not the same as the system super-user) user must be set, for security reasons :
Debian:~# mysqladmin -u root password 'password'

Change the second 'password' with the password of your choice. Be careful in your choice : your are setting the password for the « root » user, who has all rights on the databse. Now, create the GLPI database (« glpidb ») :

Debian:~# mysql -u root -p enter password : *******
mysql> create database glpidb;

You need to create the « glpiuser » MySQL user (with a password) too and to give him the right privilegies on the GLPI database :

mysql> grant all privileges on glpidb.* to glpiuser@localhost
mysql> identified by 'mot_de_passe_du_glpiuser';

If you want to make GLPI accessible throughout your company, you have to indicate the name or ip address of the server (where GLPI is installed) instead of 'localhost'.

If you do not want to manage your database in command line mode, you can install phpmyadmin. It is a PHP written tool, which is used with any web browser. You can install it while using the apt-get command (its installation is not described here, as it is not the main purpose of this document).

Download and installation of GLPI

You now just have to download the latest GLPI archive on official web site, under “download ” section.

Then, unpack the archive in the /var/www/apache2-default directory, created by Apache (you can delete this redirection while modifying your « apache2.conf » file) :

Debian:~# tar -xvzf glpi-X.X.X.tar.gz -C /var/www/apache2-default

If you go in the folder /var/www/apache2-default, you will see a GLPI folder.

Now, it is time to set permissions on some GLPI directories, in order to make it works :

Debian:~# cd /var/www/apache2-default
Debian:~# chown -R www-data glpi

While entering this command, Apache (www-data) becomes the owner of the files, folders and subfolders.

Configuration of GLPI

Now, everything is performed with a web browser. You just need to go on « http://your_glpi_server/glpi ».

On the first connection, a step by step installation procedure is launched. Interface is quite intuitive, you just need to give some informations. Once this is done, system ask you the identity you use during installation process. Then you can begin to use GLPI !

In case of big mistake (for example : you forget your own GLPI access…), you can launch the installation process again while deleting the file :

  • glpi/config/config_db.php

Connec again on « http://votre_serveur/glpi » and the porcess will start again (in fact, it is the missing file « config_db.php » which produces the launch of the process).

Be careful, if you have the message « You must compile PHP with MySQL support », it means you have to modify the « /etc/php4/apache2/php.ini » by hand.

Under the section « ;Dynamic Extensions ; », uncomment the following line (just delete the first « ; » ) :

Don't forget to restart the Apache2 server in order to register this modification. More information about GLPI configuration can be found here : [Install GLPI→].