Install GLPI (IT and Asset Management) Tool with Fusion Inventory in Debian Linux

Step 4: Configuring Apache2 to serve GLPI

8. Apache2 in Debian systems is setup a little differently than other distributions. Some find it easier to manage and others find it more difficult.

This tutorial will keep things as simple as possible and will assume that GLPI is the only website being served by this Apache2 server and that it will be served on the traditional port 80 HTTP port.

This will allow for the least amount of modifications to the default Apache2 install and will allow users to get GLPI up and running quickly. Let’s begin!

The first thing to do is switch directories to the Apache2 configuration files directory. The configuration directory is ‘/etc/apache2/sites-available‘ and the command:

# cd /etc/apache2/sites-available

9. The only items in this directory by default will be the two default Apache2 site configuration files. A new configuration file should be created for GLPI and can be created from the default in this directory using the copy command.

This will copy the configuration of the default site into a new configuration file for GLPI.

# cp 000-default.conf glpi.conf 

This new GLPI configuration file needs to be modified so that apache2 knows where the files to serve for GLPI reside. Open ‘glpi.conf‘ with a text editor and proceed to configure as follows:

  1. nano glpi.conf → open glpi.conf in the nano text editor.
  2. DocumentRoot /var/www/glpi → This tells Apache2 where the files for GLPI start. This line isn’t a command but rather something that is added to the glpi.conf file.
# nano glpi.conf

DocumentRoot /var/www/glpi
Configure Apache for GLPI

Configure Apache for GLPI

10. Apache2 has a TON of other options but for brevity’s sake, this change is the only change needed in this file. Now apache2 has to be made aware of the new GLPI site as well as told to stop serving the “default” page. This is easily accomplished with two tools a2ensite and a2dissite.

  1. a2dissite 000-default.conf → This will disable the default website Apache2 serves.
  2. a2ensite glpi.conf → This will enable the newly created GLPI website configuration.
  3. service apache2 reload → This will be necessary for Apache2 to stop/start serving the above changes.
# a2dissite 000-default.conf
# a2ensite glpi.conf
# service apache2 reload

At this point, Apache2 should be configured and serving the GLPI site information, the MySQL database is created and has an assigned user. The next step is to run the GLPI installer.

Step 5: Installing and Configuring GLPI

11. To start the installation of GLPI, simply visit the IP address of the server running Apache2. This can be done from the server itself if a graphical desktop environment has been installed; otherwise the other machine requested for this tutorial will be needed.

Upon visiting the IP address of the Apache2 server, the user will be presented with the GLPI installation page:

http://Your-IP-Address
Select GLPI installation Language

Select GLPI installation Language

12. At this point, select the appropriate language and click ‘OK‘. The next prompt will ask if this install is an upgrade or a fresh installation. This tutorial is assuming that this will be a fresh installation of GLPI.

GLPI Installation

GLPI Installation

13. The next screen will be a quick dependency check by GLPI. Everything on this next page should come back with a green light. Anything with a red light should be addressed and corrected on the server.

GLPI Dependency Checks

GLPI Dependency Checks

14. When all the lights are green, the next step is to inform the GLPI installer where the MySQL database is as well as the credentials to access the database. This information was determined earlier in this guide and should be as follows:

GLPI MySQL Database Settings

GLPI MySQL Database Settings

The server name of ‘localhost‘ can be used in this example due to the fact that this installer is running from the same server as the MySQL server.

Click continue after the three fields are filled in and the GLPI installer will run a SQL check to ensure that it can make contact with the SQL database. Since a database was already created earlier be sure to select that database in this step.

Select GLPI MySQL Database

Select GLPI MySQL Database

15. This next step will take a couple of minutes depending on the speed of the MySQL server. The final page that the GLPI installer will show will be the default username/password page.

The only user account that will be needed for this guide will be the administrator account which defaults to username: ‘glpi‘ and password: ‘glpi‘.

GLPI User Login Details

GLPI User Login Details

16. At this point, GLPI is ready for usage. Click the ‘Use GLPI‘ button to be taken to the login screen and log in as the administrator. Once logged in to GLPI, the GLPI landing screen will issue some warnings about the user-names above having the default passwords configured.

For now this can be ignored but should be changed when moving GLPI to production! The other warning will be a warning that recommends removing the installer file. This is easily accomplished by running the following ‘rm‘ command on the Debian server:

# rm /var/www/glpi/install/install.php

This concludes the installation of GLPI. At this point users can start adding inventory, creating tickets, creating a document library, and many other tasks. However, the rest of this guide will talk about how to setup the Fusion Inventory plug-in to further extend the capabilities of GLPI.

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Rob Turner

Rob Turner is an avid Debian user as well as many of the derivatives of Debian such as Devuan, Mint, Ubuntu, and Kali. Rob holds a Masters in Information and Communication Sciences as well as several industry certifications from Cisco, EC-Council, ISC2, Linux Foundation, and LPI.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

40 Responses

  1. zam says:

    fusion inventory and assets in glpi cant synchronize. I am using fusion inventory agent but they can’t send inventory to assets module.

  2. Parthiban says:

    hi Rob,

    1) actually I want to use it as secure site (https)
    2) I need only hardware inventory, not software inventory
    3) And I want I know server utilization will happen when agent communicate with server (In both end server utility as well as client also)

    Can you please help me out in this.

    • Rob Turner says:

      Parthiban,

      Thanks for the comment. GLPI does support HTTPS but you’ll have to either use a self-signed certificate or purchase one from a Certificate Authority like Verisign. As for hardware only, I’ve not looked into this yet. I will do some research and see if there is a way to disable software inventory. As for server resources, obviously when hosts start communicating back with the GLPI system resources are going to be used. Watching the unit we have setup, 30 or so clients connecting only uses about 80Mb of RAM during the connection and then frees up when they are done.

      Rob

  3. Rob Morin says:

    Fantastic and simple article, it worked out perfect for me! Thanks a bunch! As I wanted to eliminate OCS server.

    • Rob Turner says:

      Rob,

      You’re quite welcome. Do realize that GLPI does have a newer version out now as well. The new version looks a lot nicer than the version in this article.

  4. Chaitra says:

    Please ignore my comment, I was using a corrupted version of the glpi, it works now. Thanks!

  5. Chaitra says:

    Thanks for the insightful article Rob.
    I followed the steps you mentioned above, when i enter the IP address of the Apache2 server, I get a 500 error. Any ideas?

  6. Rob Turner says:

    Danielle,

    Could you provide some more information about which version of GLPI you are using as well as which plugin? There is a much newer version of GLPI out there now and you may be trying to use a plugin or version of GLPI that aren’t compatible with one another.

    • Danielle Narvaez says:

      good day rob!

      i now installed fusioninventory and configured the ‘agent.cfg’ file, but how and where do i activate the “fusioninventory-agent” command?

      hope for your speedy reply

      • Rob Turner says:

        Danielle,

        Once you’ve configured the agent.cfg file, all you need to do is run the “fusioninventory-agent” from the command line interface of the machine you wish to inventory.

  7. Raghuveer Singh says:

    Hi Rob Thank You for this wonderful post.
    I have successfully install GLPI on Centos 6.7 and add windows and linux system with fusion-inventory.
    But How to deploy fusion-inventory remotely from GLPI server because it is not possible to install fusion-inventory one by one in client system.

    Regards,
    Raghu

  8. Pierre Bowrin says:

    Greetings,

    I have managed to install GLPI v0.9 on Ubuntu 14.04 LTS with plugin for FusionInventory. The FusionInventory agent on my Ubuntu 16.04 client was also registered in the GLPI database. However, the FusionInventory agent (fusioninventory-agent_windows-x64_2.3.17.exe) on my MS WIndows 7 client was not.

    The agent appears to install without error. The host page also loads indicating the version running and an option to manually inventory. I have observed a reference to Strawberry Perl which I was unclear if was required.

    Grateful for your support and assistance in resolving this matter.

    Pierre Bowrin

  9. Ryan Cameron says:

    I’m having problems with Fusion inventory also.
    I cannot start the agent, it shows 404 error.
    I think that the error is because I used a Rosehosting tutorial first and then stumbled upon yours article after which i continued from where I left off and installed Fusion inventory.
    I think I have to start a new installation.

    • Rob Turner says:

      Ryan,

      404 just means that it couldn’t find the resource on the web server. This is still potentially correctable! First thing I would do is make sure that you have the file “/plugins/fusioninventory/front/plugin_fusioninventory.communication.php” where web root is the location of the files for GLPI. If this file exists, check the permissions on all the folders leading up to the file. They must be readable and executable by the user running the webserver (should be apache2 from this guide).

      The next thing I would check is on the GLPI client. Make sure that it can ping the webserver that is hosting the GLPI files. Then in the file “/etc/fusioninventory/agent.cfg” be sure that the “server=” line maps correctly to the file above for example: server=http://192.168.1.10//plugins/fusioninventory/front/plugin_fusioninventory.communication.php

      Let me know what happens!

  10. Sam says:

    Hi Rob i have a problem with LinuMint, when i started the agent i see this :

    testmint minttest # fusioninventory-agent start
    [error][http client] communication error : 404 not found
    [fault] No answer from the Server at /usr/share/fusioninventory/Lib/FusionInventory/Agent.pm line 261.

    How can I fix this ? Thanks !

    • Rob Turner says:

      Sam,

      This likely means that the url placed in the configuration file is not resolving. Open the agent file located at “/etc/fusioninventory/agent.cfg”. Inside this file there is a line that will start with “server = ” be sure that after the equal sign you place the url for the GLPI system. For example: “server = http://tecmint.tecmint.local/plugins/fusioninventory/front/plugin_fusioninventory.communication.php“. Be sure to change “tecmint.tecmint.local” to your systems hostname. Also make sure that the mint machine you are trying to configure can ping that hostname as well.

      • patrick ke says:

        yes I followed your guide and I successed install agent in Ubuntu 14.04.3 LTS
        My enviroment is
        sever: debain jessie installed glpi-0.85.5.tar fusioninventory-for-glpi_0.85.1.3.tar
        agent:Ubuntu 14.04.3 LTS

        • Rob Turner says:

          Patrick,

          Glad to hear! Hope you enjoy GLPI.

          • Danielle Narvaez says:

            Hi Rob! why is it every time i click the plugin it says “The action you have requested is not allowed.” i correctly installed everything and the plugin just wont work..hope you reply.

Leave a Reply to Ryan Cameron Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.