{"id":5356,"date":"2020-04-04T12:02:20","date_gmt":"2020-04-04T09:02:20","guid":{"rendered":"https:\/\/kifarunix.com\/?p=5356"},"modified":"2020-04-04T20:03:55","modified_gmt":"2020-04-04T17:03:55","slug":"install-glpi-itsm-tool-on-centos-8","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-glpi-itsm-tool-on-centos-8\/","title":{"rendered":"Install GLPI ITSM Tool on CentOS 8"},"content":{"rendered":"\n<p>Welcome to our tutorial on how to install GLPI ITsM tool on CentOS 8. <a rel=\"noreferrer noopener\" href=\"https:\/\/glpi-project.org\/\" target=\"_blank\">GLPI<\/a> is an acronym for <strong>Gestionnaire Libre de Parc Informatique<\/strong> (<strong>Open Source IT Equipment Manager<\/strong>). It is a Free Asset and IT Management Software package, ITIL Service Desk, licenses tracking and software auditing tool.<\/p>\n\n\n\n<p>GLPI&nbsp; provides&nbsp;a lot of advanced features for inventory, asset and mobile devices management. Read more <a rel=\"noreferrer noopener\" href=\"https:\/\/glpi-project.org\/features\/\" target=\"_blank\">GLPI features page<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install GLPI ITSM Tool on CentOS 8<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\n\n\n\n<p>GLPI is a web application and thus requires the basic components of LAMP\/LEMP stack. In this demo, we are using LAMP Stack and thus;<\/p>\n\n\n\n<p>Install and enable Remi repos as they provide some of the required PHP modules.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install epel-release<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install https:\/\/rpms.remirepo.net\/enterprise\/remi-release-8.rpm<\/code><\/pre>\n\n\n\n<p>Enable Remi Repos for PHP 7.4.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf module reset php<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf module enable php:remi-7.4<\/code><\/pre>\n\n\n\n<p>Execute the command below to install all GLPI LAMP stack requirements;<\/p>\n\n\n\n<p>Note, GLPI requires PHP &gt; 5.6, MySQL &gt; 5.6 or MariaDB &gt; 10.0.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf update<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install httpd mariadb-server php php-{curl,fileinfo,gd,json,mbstring,mysqli,session,zlib,simplexml,xml,cli,domxml,imap,ldap,openssl,xmlrpc,pecl-apcu} wget tar zip bzip2<\/code><\/pre>\n\n\n\n<p>You can check our other guides on setting up LAMP\/LEMP stack on CentOS 8.<\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/install-lamp-stack-on-centos-8\/\" target=\"_blank\">Install LAMP Stack on CentOS 8<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/install-lemp-stack-on-centos-8\/\" target=\"_blank\">Install LEMP Stack on CentOS 8<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configure PHP for GLPI<\/h3>\n\n\n\n<p>Edit the PHP configuration file, <code>php.ini<\/code> and ensure the following settings are in place.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/etc\/php.ini<\/code><\/pre>\n\n\n\n<p>Set the Maximum amount of memory;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>memory_limit = 128M<\/code><\/pre>\n\n\n\n<p>Enable file uploads;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>file_uploads = On<\/code><\/pre>\n\n\n\n<p>Set Maximum execution time;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>max_execution_time = 30<\/code><\/pre>\n\n\n\n<p>Disable session initialization on request startup.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>session.auto_start = 0<\/code><\/pre>\n\n\n\n<p>Disable the use of trans sid.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>session.use_trans_sid = 0<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Create GLPI Database and Database User<\/h3>\n\n\n\n<p>In this demo, we are using MariaDB as our database server. <\/p>\n\n\n\n<p>Start and enable MariaDB to run on system boot;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl enable --now mariadb<\/code><\/pre>\n\n\n\n<p>Run the initial security script.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql_secure_installation<\/code><\/pre>\n\n\n\n<p>Login to MariaDB and create GLPi database. Be sure to replace the databse name used here accordingly.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>create database glpidb;<\/code><\/pre>\n\n\n\n<p>Next, create GLPI database user and grant all rights on GLPI database.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>grant all on glpidb.* to glpiadmin@localhost identified by 'myP@ssw0rd';<\/code><\/pre>\n\n\n\n<p>Reload the privileges table and exit the database.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>flush privileges;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>quit<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Download GLPI Installer<\/h3>\n\n\n\n<p>Navigate to <a rel=\"noreferrer noopener\" href=\"https:\/\/glpi-project.org\/downloads\/\" target=\"_blank\">GLPI downloads page<\/a> or  <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/glpi-project\/glpi\/releases\" target=\"_blank\">GLPI GitHub releases page<\/a> and grab the latest stable release, which is v9.4.5 as of this writing. Get the link and pull it with wget command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/github.com\/glpi-project\/glpi\/releases\/download\/9.4.5\/glpi-9.4.5.tgz<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install GLPI on CentOS 8<\/h3>\n\n\n\n<p>GLPI is a ready made application and its installation is as easy as extracting the archive contents to the GLPI web root directory. In this demo, our GLPI web root directory is set to <code><strong>\/var\/www\/html\/glpi<\/strong><\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>tar xzf glpi-9.4.5.tgz -C \/var\/www\/html\/<\/code><\/pre>\n\n\n\n<p>Verify the GLPI web root directory;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ls \/var\/www\/html\/\n<strong>glpi<\/strong><\/code><\/pre>\n\n\n\n<p>Set the proper ownership and permissions on the GLPI web server configuration files.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>chown -R apache:apache \/var\/www\/html\/glpi<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>chmod -R 755 \/var\/www\/html\/glpi<\/code><\/pre>\n\n\n\n<p>Create Apache configuration file for GLPI.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/etc\/httpd\/conf.d\/glpi.conf<\/code><\/pre>\n\n\n\n<p>Make the appropriate substitutions in the configuration file to suit your environment.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80>\n   ServerName glpi.kifarunix-demo.com\n   DocumentRoot \/var\/www\/html\/glpi\n\n   ErrorLog \"\/var\/log\/httpd\/glpi_error.log\"\n   CustomLog \"\/var\/log\/httpd\/glpi_access.log\" combined\n\n   &lt;Directory> \/var\/www\/html\/glpi\/config>\n           AllowOverride None\n           Require all denied\n   &lt;\/Directory>\n   &lt;Directory> \/var\/www\/html\/glpi\/files>\n           AllowOverride None\n           Require all denied\n   &lt;\/Directory>\n&lt;\/VirtualHost><\/code><\/pre>\n\n\n\n<p>To setup GLPI with TLS certificates install<code> mod_ssl<\/code> package.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install mod_ssl<\/code><\/pre>\n\n\n\n<p>Edit the <code>\/etc\/httpd\/conf.d\/ssl.conf<\/code> configuration file and set the correct paths to the TLS certificate, the CA certificate, if any, and certificate key file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim +\/SSLCertificateFile \/etc\/httpd\/conf.d\/ssl.conf<\/code><\/pre>\n\n\n\n<p>Note that the configs below are Self-Signed Certificates and hence, no CA certificate specified. Be sure to obtain your certificates from a trusted CA and make appropriate configs.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>...\nSSLCertificateFile <strong>\/etc\/pki\/tls\/certs\/server.crt<\/strong>\n...\nSSLCertificateKeyFile <strong>\/etc\/pki\/tls\/private\/server.key<\/strong>\n...<\/code><\/pre>\n\n\n\n<p>Then enable HTTPS for GLPI by editing the GLPI Apache configuration file created above, You can as well enable HTTP-HTTPS redirection;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/etc\/httpd\/conf.d\/glpi.conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80>\n   ServerName glpi.kifarunix-demo.com\n   DocumentRoot \/var\/www\/html\/glpi\n\n   RewriteEngine On\n   RewriteCond %{HTTPS} off\n   RewriteRule ^(.*)$ https:\/\/%{HTTP_HOST}%{REQUEST_URI} &#91;R=301,L]\n&lt;\/VirtualHost>\n&lt;VirtualHost *:443>\n   ServerName glpi.kifarunix-demo.com\n   DocumentRoot \/var\/www\/html\/glpi\n\n   ErrorLog \"\/var\/log\/httpd\/glpi_error.log\"\n   CustomLog \"\/var\/log\/httpd\/glpi_access.log\" combined\n\n   &lt;Directory> \/var\/www\/html\/glpi\/config>\n           AllowOverride None\n           Require all denied\n   &lt;\/Directory>\n   &lt;Directory> \/var\/www\/html\/glpi\/files>\n           AllowOverride None\n           Require all denied\n   &lt;\/Directory>\n   SSLEngine on\n   SSLCertificateKeyFile \/etc\/pki\/tls\/private\/server.key\n   SSLCertificateFile \/etc\/pki\/tls\/certs\/server.crt\n&lt;\/VirtualHost>\n<\/code><\/pre>\n\n\n\n<p>Verify Apache configuration syntax.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>httpd -t\nSyntax OK<\/code><\/pre>\n\n\n\n<p>If you moved SSL\/TLS files to the specified directories instead of copying them, you need to correct the SELinux contexts on those files by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>restorecon -RvF \/etc\/pki<\/code><\/pre>\n\n\n\n<p>Start and enable Apache to run on system boot.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl enable --now httpd<\/code><\/pre>\n\n\n\n<p>If firewall is running, allow external access to Apache.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>firewall-cmd --add-port={80,443}\/tcp --permanent\nfirewall-cmd --reload<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configure other SELinux Permissions for GLPI<\/h3>\n\n\n\n<p>In our demo, SELinux is set on enforcing mode. Hence, run the commands below to set the SELinux permissions for GLPI.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>setsebool -P httpd_unified 1\nsetsebool -P httpd_can_network_connect 1\nsetsebool -P httpd_graceful_shutdown 1\nsetsebool -P httpd_can_network_relay 1\nsetsebool -P nis_enabled 1\nsetsebool -P httpd_can_network_connect_db 1\nsetsebool -P httpd_can_sendmail on<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Accessing GLPI Web Interface<\/h3>\n\n\n\n<p>You can now finalize the setup of GLPI from browser. Use the address, <strong><code>http:\/\/glpi-server-IP-or-Hostname<\/code><\/strong>.<\/p>\n\n\n\n<p>Choose you installation language.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"906\" height=\"307\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/install-lang.png\" alt=\"Install GLPI ITSM Tool on CentOS 8\" class=\"wp-image-5359\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/install-lang.png?v=1585990570 906w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/install-lang-768x260.png?v=1585990570 768w\" sizes=\"(max-width: 906px) 100vw, 906px\" \/><\/figure>\n\n\n\n<p>Accept the terms and conditions of GLPI license and click continue.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"940\" height=\"589\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/license.png\" alt=\"\" class=\"wp-image-5360\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/license.png?v=1585990596 940w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/license-768x481.png?v=1585990596 768w\" sizes=\"(max-width: 940px) 100vw, 940px\" \/><\/figure>\n\n\n\n<p>Click install, then verify that all prerequisites are met. Ignore the CAS extension warning if you are not using CAS authentication.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"472\" height=\"590\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/prerequisites.png\" alt=\"Install GLPI ITSM Tool on CentOS 8\" class=\"wp-image-5361\" title=\"\"><\/figure><\/div>\n\n\n\n<p>After all is set, proceed to configure Database connection settings;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"868\" height=\"420\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/db-connection.png\" alt=\"Install GLPI ITSM Tool on CentOS 8\" class=\"wp-image-5362\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/db-connection.png?v=1585990646 868w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/db-connection-768x372.png?v=1585990646 768w\" sizes=\"(max-width: 868px) 100vw, 868px\" \/><\/figure>\n\n\n\n<p>Choose your GLPI database.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"853\" height=\"293\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/db-init.png\" alt=\"\" class=\"wp-image-5363\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/db-init.png?v=1585990666 853w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/db-init-768x264.png?v=1585990666 768w\" sizes=\"(max-width: 853px) 100vw, 853px\" \/><\/figure>\n\n\n\n<p>Wait for the database initialization to complete. Then click continue to follow through other steps and finally login to your GLPI web interface.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"812\" height=\"371\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/glpi-login.png\" alt=\"\" class=\"wp-image-5364\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/glpi-login.png?v=1585990703 812w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/glpi-login-768x351.png?v=1585990703 768w\" sizes=\"(max-width: 812px) 100vw, 812px\" \/><\/figure>\n\n\n\n<p>To login to GLPI web interface, there are a number of default user accounts you can use;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Username<\/strong><\/td><td><strong>Account Type<\/strong><\/td><\/tr><tr><td>glpi<\/td><td>glpi<\/td><td>Admin account<\/td><\/tr><tr><td>tech<\/td><td>tech<\/td><td>Technical Account<\/td><\/tr><tr><td>normal<\/td><td>normal<\/td><td>Normal Account<\/td><\/tr><tr><td>post-only<\/td><td>postonly<\/td><td>Post only account<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Simply login as Admin, <code>glpi<\/code> and make the necessary changes including removing the default accounts above as well as resetting the password and username for GLPI admin user once you are logged in.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1365\" height=\"572\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/glpi-web-interface.png\" alt=\"\" class=\"wp-image-5365\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/glpi-web-interface.png?v=1585990726 1365w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/04\/glpi-web-interface-768x322.png?v=1585990726 768w\" sizes=\"(max-width: 1365px) 100vw, 1365px\" \/><\/figure>\n\n\n\n<p>Remove installation file;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mv \/var\/www\/html\/glpi\/install\/install.php \/var\/www\/html\/glpi\/install\/install.php.old<\/code><\/pre>\n\n\n\n<p>There you go. You have successfully installed GLPI ITSM on CentOS 8. That brings us to the end of our guide on how to install GLPI ITSM tool on CentOS 8.<\/p>\n\n\n\n<p>Reference<\/p>\n\n\n\n<p><a href=\"https:\/\/glpi-install.readthedocs.io\/en\/latest\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">Install GLPI Documentation<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Related Guides<\/h3>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/install-manageengine-assetexplorer-on-centos-7-fedora-30-29\/\" target=\"_blank\">Install ManageEngine AssetExplorer on CentOS 7\/Fedora 30\/29<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/install-manageengine-assetexplorer-on-ubuntu-18-04\/\" target=\"_blank\">Install ManageEngine AssetExplorer on Ubuntu 18.04<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/install-snipe-it-on-debian-10-ubuntu-18-04\/\" target=\"_blank\">Install Snipe-IT on Debian 10\/Ubuntu 18.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-ocs-ng-inventory-on-centos-8\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install OCS-NG Inventory on CentOS 8<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to our tutorial on how to install GLPI ITsM tool on CentOS 8. GLPI is an acronym for Gestionnaire Libre de Parc Informatique (Open<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[984,121],"tags":[1399,1400,1402,1403,1404,1401],"class_list":["post-5356","post","type-post","status-publish","format-standard","hentry","category-asset-management","category-howtos","tag-glpi","tag-glpi-centos-8","tag-glpi-itam","tag-gppi-itsm","tag-install-glpi-centos-8","tag-it-asset-management","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5356"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=5356"}],"version-history":[{"count":7,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5356\/revisions"}],"predecessor-version":[{"id":5375,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5356\/revisions\/5375"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=5356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=5356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=5356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}