How to Install GLPI on Ubuntu Server 18.04?

3
32728
Technical support
Technical support

GLPi is a web application that helps companies with the management of their information system. Among its features, this solution is able to build an inventory of all resources of the organization and manage administrative and financial tasks. GLPI stands for Gestionnaire Libre de Parc Informatique is a Free Asset and IT Management Software package, that provides ITIL Service Desk features, licenses tracking and software auditing. In other words, it’s a good idea install GLPI in your company.

The tool is build for Apache-PHP-MySQL environments, so you can install it on both windows and linux servers.

GLPI features:

  • Inventory of computers, peripherals, network printers and any associated components through an interface, with inventory tools such as: FusionInventory or OCS Inventory.
  • Data Center Infrastructure Management (DCIM).
  • Item lifecycle management.
  • Licenses management (ITIL compliant).
  • Management of warranty and financial information (purchase order, warranty and extension, damping).
  • Management of contracts, contacts, documents related to inventory items.

In addition, like any open source project, it is possible to modify and examine its source code.

In this article, i will show you how to install GLPI on Ubuntu Server 18.04.

What you need

The installation of GLPI is really simple, but you must have a previous knowledge in the use of the terminal. Besides installing LAMP stack and of course a computer with Ubuntu Server 18.04.

Let’s get to work.

1. Upgrade the system

First you have to update the system. Doing this will ensure you have the latest package news, as well as the latest security patches. Open a terminal and run.

:~$ sudo -i

When you enter the password, you will be root. Then run:

:~# apt update && apt upgrade
1.- Upgrading the system
1.- Upgrading the system

And with this done, you’ll have your system up to date.

2. Install LAMP Stack

GLPI is a web-based application, i.e. you need an installed and fully functional web server. For this tutorial, I will use apache2. It is the most popular web server and is available easily and directly from the Ubuntu repositories. Run:

:~# apt install apache2
2.- Installing apache
2.- Installing apache

Now enable it to start the service as soon as you load the system and initialize the service as well.

:~# systemctl enable apache2
:~# systemctl start apache2
3.- Enabling apache service
3.- Enabling apache service

Now if you go to your web browser and access http://IP_SERVER you will see this.

4.- Apache Ubuntu Default page
4.- Apache Ubuntu Default page

It’s PHP’s turn.

PHP is a programming language in which GLPI is built. You have to install it to run it.

:~# apt install php7.2 php7.2-curl php7.2-gd php7.2-intl php-pear php-imagick php7.2-imap php-memcache php7.2-pspell php7.2-recode php7.2-tidy php7.2-xmlrpc php7.2-xsl php7.2-mbstring php-gettext php7.2-ldap php-cas php7.2-apcu libapache2-mod-php7.2 php7.2-mysql
5.- Installing PHP from ubuntu official repositories
5.- Installing PHP from ubuntu official repositories

Finally install MariaDB. Type on a terminal:

:~# apt install mariadb-server
6.- Installing MariaDB
6.- Installing MariaDB

Now run the configuration script to define password and other options.

:~# mysql_secure_installation
7.- mysql_secure_installation
7.- mysql_secure_installation

After defining the password, you will be asked about other things. Answer Y N Y Y.

Now you have to create a database dedicated to GLPI and a new MariaDB user.

:~# mysql -u root -p

And then creates the database and the new user.

CREATE DATABASE glpidb;
USE glpidb;
GRANT ALL PRIVILEGES ON glpidb.* TO 'glpiuser'@'localhost' IDENTIFIED BY 'glpipss';
FLUSH PRIVILEGES;
exit;

Of course, you’re free to change the names to whatever you want.

8.- Creating a database for glpi
8.- Creating a database for glpi

3. Download and install GLPI

Now it’s time to install GLPI. First, download it.

:~# cd /tmp/
wget https://github.com/glpi-project/glpi/releases/download/9.3.1/glpi-9.3.1.tgz
9.- Download and install GLPI
9.- Download and install GLPI

Afterwards, you have to extract it, move it to /var/www/html and assign permissions to it.

:~# tar -xvf glpi-9.3.1.tgz
:~# mv glpi /var/www/html/
:~# chmod 755 -R /var/www/html/
:~# chown www-data:www-data -R /var/www/html/
10.- Installing GLPI
10.- Installing GLPI

Now go to your browser and access GLPI to complete the installation http://IP_SERVER/glpi

11.- Completing GLPI setup
11.- Completing GLPI setup

Then you have to accept the license terms.

12.- License terms
12.- License terms

On the next screen you will be asked if it is an installation or an upgrade.

13.- Install GLPI
13.- Install GLPI

Afterwards, the system will make an inspection of the dependencies in need.

14.- Install GLPI on the system
14.- Install GLPI on the system

On the next screen, you will be prompted to enter the MariaDB for GLPI information.

15.- MariaDB credentials
15.- MariaDB credentials

And at the end, you have select the database created.

16.- Completing the installation
16.- Completing the installation

It will then initialize the database.

17.- Initialization of the database
17.- Initialization of the database

The following screens show that the installation is on the right way.

18.- Collecting data for GLPI
18.- Collecting data for GLPI
19.- Installing GLPI
19.- Installing GLPI
20.- The installation is finished
20.- The installation is finished

And finally you will see the log in screen.

21.- GLPI log in screen
21.- GLPI log in screen

When you enter the password, you’ll see something like this.

22.- Main screen of glpi
22.- Main screen of glpi

Conclusion

GLPI is a great system that allows us to obtain computer solutions for our company. You can modify and take inventory, tracking incidents and so on.

We want to know about you, have you used GLPI? How did you like the installation?

Please share this article through your social networks

 

 

3 COMMENTS

  1. Hi Angelo,
    I got this error when try to install PHP
    ——-
    # apt install php7.2 php7.2-curl php7.2-gd php7.2-intl php-pear php-imagick php7.2-imap php-memcache php7.2-pspell php7.2-recode php7.2-tidy php7.2-xmlrpc php7.2-xsl php7.2-mbstring php-gettext php7.2-ldap php-cas php7.2-apcu libapache2-mod-php7.2 php7.2-mysql
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Note, selecting ‘php7.2-xml’ instead of ‘php7.2-xsl’
    Package php-imagick is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    Package php-memcache is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Unable to locate package php7.2-intl
    E: Couldn’t find any package by glob ‘php7.2-intl’
    E: Couldn’t find any package by regex ‘php7.2-intl’
    E: Package ‘php-imagick’ has no installation candidate
    E: Unable to locate package php7.2-imap
    E: Couldn’t find any package by glob ‘php7.2-imap’
    E: Couldn’t find any package by regex ‘php7.2-imap’
    E: Package ‘php-memcache’ has no installation candidate
    E: Unable to locate package php7.2-mbstring
    E: Couldn’t find any package by glob ‘php7.2-mbstring’
    E: Couldn’t find any package by regex ‘php7.2-mbstring’
    E: Unable to locate package php-gettext
    E: Unable to locate package php-cas
    E: Unable to locate package php7.2-apcu
    E: Couldn’t find any package by glob ‘php7.2-apcu’
    E: Couldn’t find any package by regex ‘php7.2-apcu’
    ——
    is there any advice for the problem?

  2. I followed the instructions, but am not able to get past GLPI Setup Step 1.

    SQL Server is localhost
    User Name is glpiuser
    I have tried every password I could think of, and even tried resetting it in the MySQL database, but it always says the same thing:

    Step 2
    Test of the connection at the database
    Can’t connect to the database
    The server answered: Access denied for user ‘glpiuser’@’localhost’ (using password: YES)

LEAVE A REPLY

Please enter your comment!
Please enter your name here