Install GLPI on Ubuntu 18.04 with MariaDB and NGinX
GLPI is an asset management software. It can handle automatic inventory of your assets (workstations, servers, printers, etc.) ticketing, and much more. Let’s see how to install it under Ubuntu with MariaDB and NGinX.
Prepare your system
Simply install the requirements :
|
|
Create the self signed certificates :
|
|
NB :
- Replace " glpi.domain.com" with your desired domain name (3 times!).
- The certificate is valid for 10 years ( 3650 days ).
- The certificate will be located in /etc/ssl/certs and the key in /etc/ssl/certs/private.
Create the dhparam file for NGINX :
|
|
Your system is now “well prepared”, let’s move on to the the setup of the various services.
Prepare MySQL / MariaDB
Let’s secure our database : MySQL / MariaDB installation :
|
|
Answer “yes” to all questions, and define a secure root password!
NB : you’ll probably run into an error, where mysql / mariadb won’t start. If you check journalctl, it will say something about apparmor denying the execution of mariadb. Run the following command and reboot (yes, reboot)!
|
|
Now, connect to mysql with “root” user and create the database + user for your GLPI installation :
|
|
NB : make sure to connect to MySQL using “root”, otherwise, you might run into issues.
|
|
Prepare NGiNX
NGiNX is the web server, let’s prepare it.
Remove the default website :
|
|
Now, we are going to create the “virtual-host” for NGiNX, in order to serve the GLPI website :
|
|
Then paste the following :
|
|
Then we create a symlink from the “available” directory to the “enabled” directory.
|
|
Install the application
We’ll prepare the required folders :
|
|
Browse to GLPI Github release page, and copy link from latest version, then download it directly on your server in your home directory :
|
|
NB : use the .tgz file and replace version number with the latest one.
Extract the files :
|
|
This should extract all the files into the glpi folder.
We are now going to the move the files to the appropriate folders so that our installation doesn’t contain everything in the web directory (which is not secure).
Go to the glpi folder :
|
|
Then execute the following commands :
|
|
Now, gives the necessary rights :
|
|
Everything should be ready, let’s move on the next part!
GLPI, follow the wizard
From now, on simply open a web browser and go to the IP address of your server, simply specifying the HTTPS protocol, this should be something like :
NB : make sure to declare glpi.domain.com in some DNS server.
From now, on, simply follow the instruction on your screen…
Enter the database information :
- Server : localhost
- User : glpi
- Password : My-Aw3s0mE-P@SSW0rD
Select (or create) the database called “GLPI” ;
Windows like install, hit the “next” button until it is completed.
NB : your install might crash at some point with a timeout. Fear not, it is not blocking. Wait about 2 minutes, then keep on following the guide.
When it is done, browse to the main URL, and you should be brought to a brand new login page.
Log in with the default “admin” account which is " glpi/glpi". Once logged, in remember to change password for all the default accounts (and/or disable some of them), and remove the file install.php from your /var/www/glpi/install directory.
You are now all set, enjoy GPLI!