How to Install GLPI on POP! OS

In this tutorial, you will learn how to install GLPI on the latest version of POP! OS.

Prerequisites

1. Install Apache Web Server

The first step is to install the Apache web server to serve GLPI. Open a terminal and update the package cache:

sudo apt update

Install Apache using the following command:

sudo apt install apache2

Once the installation is complete, start the Apache service:

sudo systemctl start apache2

To verify that Apache is successfully installed, open a web browser and visit http://localhost. You should see the Apache2 Ubuntu Default Page.

2. Install MariaDB

GLPI requires a database, and MariaDB is a popular choice. Install MariaDB using the following command:

sudo apt install mariadb-server

Once the installation is complete, start MariaDB:

sudo systemctl start mariadb

Secure the database installation with the following command:

sudo mysql_secure_installation

Follow the prompts to set a root password, disable anonymous users, disallow root login remotely, remove test databases, and reload privilege tables.

3. Create a Database and User

Create a new database and user for GLPI using the following commands:

sudo mysql -u root -p

Enter the root password when prompted, and then run the following SQL commands to create a new database and user:

CREATE DATABASE glpi;
CREATE USER 'glpi_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON glpi.* TO 'glpi_user'@'localhost';
FLUSH PRIVILEGES;
exit

Replace password with your preferred password for the glpi_user account.

4. Install PHP and Required Extensions

GLPI requires PHP 5.6 or newer and several extensions. Install PHP and the required extensions using the following command:

sudo apt install php libapache2-mod-php php-mysql php-cli php-xml php-mbstring php-ldap php-gd php-curl php-zip

Once installed, restart Apache to load the new PHP module:

sudo systemctl restart apache2

5. Download and Install GLPI

Download the latest version of GLPI from the official website using a web browser or the following command:

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

Extract the downloaded package to the web server's root directory:

sudo tar -xf glpi-9.5.6.tgz -C /var/www/html/

Change the ownership of the GLPI directory to the Apache user:

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

6. Configure Apache

Create a new virtual host configuration file for GLPI using the following command:

sudo nano /etc/apache2/sites-available/glpi.conf

Add the following configuration to the file:

<VirtualHost *:80>
  ServerAdmin admin@example.com
  DocumentRoot /var/www/html/glpi/
  ServerName glpi.example.com

  <Directory "/var/www/html/glpi/">
    AllowOverride All
    Require all granted
  </Directory>

  ErrorLog ${APACHE_LOG_DIR}/glpi_error.log
  CustomLog ${APACHE_LOG_DIR}/glpi_access.log combined
</VirtualHost>

Replace admin@example.com with a valid email address, glpi.example.com with a valid domain name or IP address, and /var/www/html/glpi/ with the full path to the GLPI directory.

Save and close the file by pressing Ctrl+X, Y, then Enter.

Enable the new virtual host:

sudo a2ensite glpi.conf

Disable the default virtual host:

sudo a2dissite 000-default.conf

Restart Apache to apply the changes:

sudo systemctl restart apache2

7. Complete the GLPI Installation

Open a web browser and visit http://glpi.example.com or the IP address of your server. You should see the GLPI installation page.

Follow the on-screen instructions to complete the installation. When prompted for the database settings, enter the following values:

Once the installation is complete, log in to the GLPI web interface using the default login credentials (glpi as the username and glpi as the password). You can then change the password and start using GLPI to manage your IT assets and tickets.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!