1. Overview
GLPI is an open-source IT asset management software which the most useful features such as network inventory software, server asset management or computer asset management, hardware asset management, software asset management, and IT asset tracking . It is a good IT asset management software used to build up a database with an inventory devices such as computer, software, and printers, ….etc. It has enhanced functions to make the daily life for the administrators easier, like a job-tracking-system and IT asset tracking with mail-notification and methods to build a database with basic information about your network-topology.
In this article will show how to install GLPI IT asset management software on CentOS 7. At the time of writing this document, the latest GLPI IT asset management software version that available to download is 9.1.3.
2. Prerequisites
In this tutorial installing GLPI IT asset management software on CentOS 7 server, it is supposed that:
a. You have already install RHEL/CentOS 7 Linux server up and running. In case that you don’t, you would probably like to read this link. Minimal RHEL/CentOS 7 Installation With Logical Volume Manager (LVM).
b. You have already done the initial server setup. Please refer to this link Minimal RHEL/CentOS 7 Initial Server Setup.
3. Install and Configure Database for GLPI Application
In CentOS 7 server, MySQl is moved to MariaDB, execute the following command to install MariaDB.
# yum -y install mariadb-server mariadb-devel
Enable MariaDB database program service to start it a the system boot and start its service.
# systemctl enable mariadb # systemctl start mariadb
Now let do the security hardening of MariaDB by execute the following command.
# mysql_secure_installation
We need to create a database and a user for GLPI IT asset management software on CentOS 7 server and grant it all database privileges.
# mysql -u root -p > create database glpidb; > create user 'glpiuser'@'localhost' identified by 'P@ssword01'; > grant all privileges on glpidb.* to glpiuser@localhost; > flush privileges;
4. Installing GLPI Application
To install GLPI IT asset management software, we need to install some mandatory packages as the following first.
# yum -y install httpd php php-mysql php-pdo php-gd php-mbstring php-imap php-ldap
Enable Apache service to start it a the system boot and start its service.
# systemctl enable httpd # systemctl start httpd
Now let move to the installation directory for IT asset management software, /var/www, download and extract it.
# cd /var/www/ # wget https://github.com/glpi-project/glpi/releases/download/9.1.3/glpi-9.1.3.tgz # tar -xvf glpi-9.1.3.tgz
It is recommended to create a symbolic link to the extracted directory of GLPI IT asset management software. So, it will make us easy to upgrades GLPI IT asset management software to a newer versions.
# cd /var/www/ # mv glpi glpi-9.1.3 # ln -s glpi-9.1.3 glpi
Also, we need to make sure that the permissions on the GPLI IT asset management software root directories are set correctly as the following.
# chmod -R 755 /var/www/glpi-9.1.3 # chown -R apache:apache /var/www/glpi-9.1.3
Next, we need to open HTTP port 80 on IPTables.
# vim /etc/sysconfig/iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT # systemctl restart iptables # iptables -L -n -v
Usually, the default PHP installation usually has not configured the correct timezone or php error reporting.
While not required to run GPLI IT asset management software, it’s highly recommended to enable error reporting to syslog for troubleshooting issues with plugins or other scripts. Edit file /etc/php.ini as the following.
# vim /etc/php.ini date.timezone = Asia/Phnom_Penh log_errors = syslog
Then, we need to restart Apache service.
# systemctl restart httpd
We also need to disable SELinux.
# vim /etc/selinux/config SELINUX=disabled # reboot
5. Configure VHost for GLPI Application
To create a VHost for GLPI IT asset management software, create a *.conf file in directory /etc/httpd/conf.d as the following.
# vim /etc/httpd/conf.d/glpi.conf <VirtualHost *:80> ServerAdmin sysadmin@techspacekh.com ServerName glpi.techspacekh.com DocumentRoot /var/www/glpi ErrorLog "/var/log/httpd/glpi.techspacekh.com.log" CustomLog "/var/log/httpd/glpi.techspacekh.com.log" combined <Directory> /var/www/glpi/config> AllowOverride None Require all denied </Directory> <Directory> /var/www/glpi/files> AllowOverride None Require all denied </Directory> </VirtualHost>
Then, we need to restart Apache service.
# systemctl restart httpd
Finally, we are ready to install GPLI IT asset management software. In your browser, in the address box type in http://glpi.techspacekh.com and the following windows appears. Click OK to continue.
Then, we need to accept the license agreement of GLPI IT asset management software.
In this step, click on Install to start installing GLPI IT asset management software.
There are several tests are carried out to check if the PHP extensions and the configuration conform to the needs of GLPI IT asset management software.
Next, we need to specify the database connection settings for GPLI IT asset management software.
Coming into this step, just select the existing database.
Then, click Continue.
The installation wizard of GLPI IT asset management software will show us the predefined user accounts as you can see in below picture.
We can now delete the GLPI IT asset management software installation file in /var/www/html/glpi/install/install.php.
# rm -rf /var/www/html/glpi/install/install.php
Now we can try to login to the GLPI IT asset management software Web interface with the glpi user whose default password is also glpi.
Below is how the administration interface of GPLI IT asset management software looks like.
7. Conclusion
That’s all about installing GLPI IT asset management software for network inventory software, server asset management or computer asset management, hardware asset management, software asset management, and IT asset tracking on RHEL/CentOS 7 from Tech Space KH. Hopefully, you can find this guide informative. If you have any questions or suggestions you can always leave your comments below. I will try all of my best to review and reply them.