How to Install GLPI on Ubuntu Server
GLPI is an open-source IT service management software that helps businesses to manage their IT assets, track and resolve incidents, and automate workflows. In this tutorial, we will guide you through the process of installing GLPI on Ubuntu Server latest.
Prerequisites
Before we begin, ensure that your Ubuntu Server meets the following prerequisites:
- Ubuntu Server latest installed
- A sudo user
- LAMP stack (Linux, Apache, MySQL, PHP) installed
Step 1: Install Required PHP Modules
GLPI requires several PHP extensions to run correctly. Run the following command to install these extensions.
sudo apt-get install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-ldap
Step 2: Download and Extract GLPI
Download the latest stable release of GLPI from the official website: https://github.com/glpi-project/glpi/releases.
Extract the downloaded archive by running the following command:
tar xzf glpi-*.tgz -C /var/www/html/This command will extract the contents of the archive to
/var/www/html/glpi.Adjust the ownership of the extracted directory with the following command:
sudo chown -R www-data:www-data /var/www/html/glpi/This command sets the files' ownership to the Apache user
www-data.
Step 3: Configure Apache for GLPI
Create a new Apache site configuration file for GLPI by running the following command.
sudo nano /etc/apache2/sites-available/glpi.confAdd the following lines to the file:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/glpi ServerName example.com ServerAlias www.example.com <Directory /var/www/html/glpi> Options FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/glpi_error.log CustomLog ${APACHE_LOG_DIR}/glpi_access.log combined </VirtualHost>Save the file, close the editor, and enable the Apache site configuration file by running the following commands:
sudo a2ensite glpisudo systemctl restart apache2
Step 4: Create a MySQL Database and User for GLPI
Log in to the MySQL database server as the root user:
sudo mysql -u root -pCreate a new database for GLPI by running the following command:
CREATE DATABASE glpi CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;This command creates a new database named
glpiwith theutf8mb4character set andutf8mb4_unicode_cicollation.Create a new MySQL user for GLPI by running the following command:
GRANT ALL ON glpi.* TO 'glpiuser'@'localhost' IDENTIFIED BY 'your_password_here';Replace
your_password_herewith a strong password for theglpiuseruser.Flush the privileges and exit the MySQL server by running the following commands:
FLUSH PRIVILEGES;exit;
Step 5: Run the Installation Wizard
Open your web browser and navigate to
http://your_server_ip/glpi/.The GLPI installation wizard should start. Follow the instructions in the wizard to configure GLPI.
- Choose your language and click on
OK. - Review the license agreement and click on
I agree. - Check the server requirements and click on
Next. - Enter the database settings (database name, database user, database password, and database host (localhost)) and click on
Next. - Create a new GLPI administrator account by entering the required information and click on
Next. - Set the installation directories and click on
Next. - Review the summary of your GLPI configuration and click on
Install.
- Choose your language and click on
After the installation is complete, you can access your GLPI application by navigating to
http://your_server_ip/glpi/.
Congratulations! You have successfully installed GLPI on your Ubuntu Server.