GLPI

Installing GLPI on Ubuntu 20.04

Spread the love

GLPI

GLPI is a really great Asset Management Suite with built in ITIL Helpdesk function and a knowledgebase that integrate really nicely. I have been using this software since about 2004 so it is a really mature project!

This installation of GLPI is pretty straight forwards and can be done with the following Steps:

1. Upgrade and Update Ubuntu

Before we begin the installation of GLPI we need to first make sure that Ubuntu is up to date by running the following commands on the server:

sudo apt update -y && sudo apt upgrade -y
Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 1

Once the update and upgrade has finished move onto step 2:

2. Install MariaDB database server

Install MariaDB from apt by running the following command:

sudo apt install mariadb-server

Make the installation secure by running:

sudo mysql_secure_installation

Once the Installation is complete log into your database with the root user:

sudo mysql -u root -p

UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE User = 'root';
FLUSH PRIVILEGES;
QUIT;

Create a user and database for GLPI:

mysql -u root -p 

CREATE DATABASE glpi; 

CREATE USER 'glpi'@'localhost' IDENTIFIED BY 'DBPassword'; 

GRANT ALL PRIVILEGES ON glpi.* TO 'glpi'@'localhost'; 

FLUSH PRIVILEGES; 

EXIT;

3. Install PHP and Apache

Run the following command to install PHP and Apache:

sudo apt-get install apache2 libapache2-mod-perl2 libapache-dbi-perl libapache-db-perl php7.4 libapache2-mod-php7.4 php7.4-common php7.4-sqlite3 php7.4-mysql php7.4-gmp php-cas php-pear php7.4-curl php7.4-mbstring php7.4-gd php7.4-cli php7.4-xml php7.4-zip php7.4-soap php7.4-json php-pclzip composer php7.4-intl php7.4-apcu php7.4-memcache php7.4-ldap php7.4-tidy php7.4-xmlrpc php7.4-pspell php7.4-json php7.4-xml php7.4-gd php7.4-bz2

After installing all these packages, edit the php.ini file (/etc/php/7.4/apache2/php.ini):

sudo vim /etc/php/7.4/apache2/php.ini

And change the time zone, memory limit and file upload size as given below:

memory_limit = 512M
post_max_size = 100M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = Europe/London

Then save and exit the file.

4. Download and Install GLPI

Download the latest stable release of GLPI. It follows a semantic versioning scheme, on 3 digits, where the first one is the major release, the second the minor and the third the fix release.

Check for the latest stable release on the :Downloads page. As of this writing, this is 9.5.5.

Install wget by running:

sudo apt-get -y install wget

Set the version number to be installed by running:

export VER="9.5.5"

Download GLPI 9.5.5 by running:

wget https://github.com/glpi-project/glpi/releases/download/$VER/glpi-$VER.tgz

When the download is complete you will be returned to the command line:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 2

Extract the downloaded archieve by running:

tar xvf glpi-$VER.tgz

Move the extracted glpi director /var/www/html:

sudo mv glpi /var/www/html/
Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 3

Give apache user ownership of the /var/www/html/glpi directory and all of its contents:

sudo chown -R www-data:www-data /var/www/html/glpi

5. Finish the GLPI installation

The rest of the installation needs to be done from the web browser. If you are on the same machine as the glpi installation got to http://127.0.0.1/glpi/install/install.php if you are installing glpi on a remote machine go to http://serverip/glpi/install/install.php

This will bring up the following page:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 4

Select you language and click the OK button this will bring the following screen:

Installing GLPI on Ubuntu 20.04
Accept the license agreement and click Continue:
Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 5

Click Install:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 6

This will show any issues that need fixing:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 7

To fix the error about Web access edit the /etc/apache2/apache2.conf file so that the following text is changed from:

Options Indexes FollowSymLinks
AllowOverride None
Require all granted

To:

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>


Save the changes and restart Apache2 with:

sudo service apache2 restart

Now there are no-more errors:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 8

Click Continue.

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 9

Add the details of the root user and press Continue:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 10

Select the GLPI database and click Continue:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 11

Wait for the database to initialize:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 12

Click Continue:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 13

Untick Send “usage Statistics” and click Continue:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 14

Click Continue again:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 15

The installation is now complete. click on use GLPI to access GLPI:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 16

Log in with one of the glpi user and click Post:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 17

You will now be logged into GLPI and on the dashboard:

Installing GLPI on Ubuntu 20.04
Installing GLPI on Ubuntu 20.04 18

Go to the next post to learn how to change all of the default user passwords and to remove the install.php file to clear the orange banner at the top of the page.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top