Installing GLPI on Ubuntu Linux

This tutorial will show you all the steps required to install GLPI on Ubuntu Linux.

1. Install MySQL on Ubuntu Linux

GLPI requires a database system to store all its configuration.

Use the Ubuntu APT command to install the MySQL server.

# apt-get update
# apt-get install mysql-server mysql-client

Use the following command to access the MySQL service console.

# mysql -u root -p

On the MySQL console, you need to perform the following tasks:

• Create a database named glpi.
• Create a MySQL user account named glpi.
• Give full control over the glpi database to the glpi user.

CREATE DATABASE glpi CHARACTER SET UTF8 COLLATE UTF8_BIN;
CREATE USER 'glpi'@'%' IDENTIFIED BY 'kamisama123';
GRANT ALL PRIVILEGES ON glpi.* TO 'glpi'@'%';
FLUSH PRIVILEGES;
quit;

2. Install Apache on Ubuntu Linux

GLPI requires a web server with PHP support to present its web pages.

Use the Ubuntu APT command to install the Apache server.

# apt-get update
# apt-get install apache2 php7.2 php7.2-mysql libapache2-mod-php7.2

Install the Apache required PHP modules.

# apt-get install php7.2-json php7.2-gd php7.2-curl php7.2-mbstring php-cas
# apt-get install php7.2-xml php7.2-cli php7.2-imap php7.2-ldap php7.2-xmlrpc php-apcu

Enable Apache mod_rewrite.

Edit the apache2.conf file.

# a2enmod rewrite
# vi /etc/apache2/apache2.conf

Add the following lines at the end of apache2.conf

<Directory /var/www/html>
AllowOverride All
</Directory>

Find the location of the PHP configuration file on your system.

Edit the php.ini configuration file.

# updatedb
# locate php.ini
# vi /etc/php/7.2/apache2/php.ini

Your PHP version may not be the same as ours.

Your PHP configuration file location may not be the same as ours.

Here is the file with our configuration.

file_uploads = On
max_execution_time = 300
memory_limit = 256M
post_max_size = 32M
max_input_time = 60
max_input_vars = 4440

Restart the Apache web server manually.

# service apache2 restart
# service apache2 status

Verify the Apache service status.

● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Mon 2018-12-03 03:41:12 -02; 2 days ago

3. Install GLPI on Ubuntu Linux

After finishing the MySQL and the Apache configuration, we can start the GLPI installation.

Download the GLPI latest version and extract the package.

# cd /tmp
# wget https://github.com/glpi-project/glpi/releases/download/9.3.3/glpi-9.3.3.tgz
# tar -zxvf glpi-9.3.3.tgz

Move the GLPI folder inside your Apache root drive directory.

Give the www-data user full control over the GLPI directory and its files.

# mv glpi /var/www/html/
# chown www-data.www-data /var/www/html/glpi/* -R

Create an Apache configuration file named glpi.conf.

# vi /etc/apache2/conf-available/glpi.conf

Here is the file with our configuration.

<Directory /var/www/html/glpi>
AllowOverride All
</Directory>

<Directory /var/www/html/glpi/config>
Options -Indexes
</Directory>

<Directory /var/www/html/glpi/files>
Options -Indexes
</Directory>

Enable the new configuration on Apache.

# a2enconf glpi

Restart the Apache web server manually.

# service apache2 restart

4. Configure GLPI on Ubuntu Linux

Open your browser and enter the IP address your web server plus /glpi.

In our example, the following URL was entered in the Browser:

• http://200.200.200.200/glpi

The GLPI installation wizard will be presented.

Select the desired language.

GLPI Language

Accept the GLPI terms of license

GLPI terms of license

Click on the Install button.

GLPI Installation

Click on the Continue button.

GLPI Installation Summary

Enter the MySQL login information required to connect to the GLPI database

GLPI MySQL

Select the GLPI database and click on the Continue button.

GLPI Database installation

Click on the Continue button.

GLPI Usage statistics

Take note of the default logins and passwords.

Click on the Use GLPI button.

On the Login screen, enter the GLPI account and password.

After a successful login, The GLPI dashboard will be displayed.

GLPI Dashboard

Congratulations, GLPI is installed on your system.

On the Linux console, delete the GLPI installation file.

# rm /var/www/html/glpi/install/install.php