📜 ⬆️ ⬇️

GLPI in a small organization, part 1. Typical deployment and pitfalls

Before writing my first publication on Habré, I thought about the subject of the article for a long time, I wanted a breakthrough and full coverage of the article’s question. However, once again faced with questions from colleagues on GLPI, I decided to highlight the “typical” deployment of this system within the enterprise infrastructure for 250 people and point out to Hobr's wide circle of readers some of the pitfalls.

Presumably, this will be the first of a series of articles on GLPI, and if the topic proves necessary, I will happily continue this cycle.

I first encountered GLPI at the very beginning of my work in the field of system administration. The system was inherited from my colleague and predecessor. The only function that this system performed in the organization was the static storage of information about the computers used in the enterprise. Everything.

It was for these purposes that a small server was assembled, the latest and stable Ubuntu Linux for 2011 was installed step by step on the basis of the manual, where the GLPI complex was located, including a MYSQL server with a GLPI database (DB), a web server Apache with PHP5 and GLPI itself.
')
So, before proceeding with the installation, we must ask ourselves at least three questions:

1. What benefits will GLPI bring to our organization?
2. In what capacity do we want to use this system?
3. Can we maintain and maintain this system?

In the case described above, there were no answers to these three questions.

Now GLPI is not just a “Free manager of a computer equipment park,” as it once was, but a combine that can help you manage your IT infrastructure, support your users, plan your budget, manage your department and much more. The capabilities of GLPI greatly expand add-ons that are easy to use and have rich functionality.

Expanding GLPI in an enterprise, I always ask myself the above questions and, I think, have compiled a typical picture of GLPI deployment.

one.
- GLPI will help in the inventory of the park of office equipment, allowing to detect, organize and replace outdated computer equipment, and thus increase productivity;
- GLPI will allow to systematize, group, prioritize and monitor the status of applications for technical support, thereby speeding up the implementation of important and priority applications, which will lead to an increase in labor productivity.

2
- GLPI will be used in its usual role of “manager of computer equipment park”;
- GLPI will take on the role of a user support system;
- GLPI will help in the management of IT-department (budget, equipment suppliers, service providers, etc.)

3
- The company already uses a number of systems deployed on GNU / Linux (Zabbix, Openfire, internal web site, MYSQL database server for the above systems), and adding one server will not drastically complicate the infrastructure.

If you do not have systems deployed on Unix-like operating systems, it is worth getting the necessary knowledge at the level of basic administration.

Working with Unix-like OS for several years, I can safely say that for GLPI, the reliability of Debian GNU / Linux is sufficient so as not to worry about the full performance of GLPI for many years. But do not forget about critical updates and security updates, and make regular backups.

Below I will present, in my humble opinion, the basic system configuration and additions for a typical GLPI deployment.

Firstly , before preparing for the installation, we must plan everything and decide on the version of the GLPI we need and additions to it, so that the entire infrastructure is compatible with GLPI.

Secondly , we will need two virtual machines (VM) with Debian GNU / Linux. One for MYSQL DB, the second for GLPI.

I prefer to allocate server roles with the MYSQL database due to the peculiarities of the MYSQL server and for some other reasons, for example, it may be useful for us to host databases of other projects, such as Zabbix. When using this configuration, it is very convenient to manage the MYSQL database using PHPMyAdmin, I advise you to install this web interface.

The first pitfall: do not forget to open the ability to connect to the MYSQL database server from other hosts. This is done quite simply. You need to fix the file /etc/mysql/my.cnf

To allow listening to all addresses, just comment out the line
bind-address = 127.0.0.1

More information can be found here .

VMs with the MYSQL database need to be configured, considering that this is a database server where the size and number of databases will grow, and VMs with GLPI - given that this is a web server, where the growth of the size of GLPI folders is expected. Both VMs will require the installation of an Apache web server and PHP5.

Let me remind you that on the VM with the MYSQL database, we will need to additionally install PHPMyAdmin for convenient management of the MYSQL database. On the Internet, a huge number of step-by-step and complete installation manuals for such systems, finding them is not a problem, and this is the topic of a separate article.

Also, do not forget to install the client mysql ( mysqlclient ) on the server intended for GLPI, it is useful for interacting with the database server.

Thirdly , I advise installing GLPI not from repositories, but from the GLPI site, since this will allow a clean installation, without a “locomotive” of unnecessary dependencies and programs. In addition, the site can always find the latest version of GLPI, or choose one of the old releases.

The second pitfall: with this type of installation, you need to remember to issue permissions for the web server (www-data) to the folder with the unpacked GLPI, the most convenient way to do this is using the chown utility, which is part of Debian GNU / Linux.

You also need to remember to fix the Apache2 configuration files by creating a file in the / etc / apache2 / sites-available folder, for example glpi.conf. It's easier to do this by copying the default configuration - the file 000-default.conf

In the new file, we correct the ServerName, ServerAlias, and DocumentRoot settings, specifying the site name, alias, and location of the unpacked GLPI. It is convenient to specify a short address, for example "tp" or "glpi".

Add a new site with the command: a2ensite glpi.conf after that you need to restart Apache.

Prior to the full launch of GLPI, I do not advise you to delete the default configuration file and turn off the default site, it can be useful for easier viewing and adjusting PHP parameters in the future.

Fourthly , it remains to create a database and user for GLPI on the server and grant it rights, for this purpose it is convenient to use PHPMyAdmin.

So, the database is created, the user has received administrative rights to the database.

The third pitfall: to complete the work GLPI need to correct the file in * / glpi / config / config_db.php

It is necessary to fill in all the fields, indicating the address of the server with the MYSQL database, the name of the database, the user name and password. The final touch - you need to mark the database to use GLPI. It is for this procedure that the mysql client is useful. Execute the command, dump the bay into the new database:

mysql -u username -h name_or_ip_server_BD -p password db_name <* / glpi / install / mysql / glpi- version_GLPI -empty.sql

Please note that I have indicated an incomplete path, since you can place GLPI in different places (for example, in the user folder / home / user1 or in / usr / share / I advise you to place it in / var / www /). On the way * / glpi / install / mysql / you can find all the dumps available for uploading.

Fifth , I advise you to create an A-record in the DNS, with a short name, preferably matching ServerName, for example glpi, so that you can easily and easily go to the GLPI web interface. Enter glpi in the browser and go to the GLPI configuration.

In the sixth , a few words about the additions. For a “typical” installation, it is convenient to use:

- Archires (Network Architecture) (the ability to clearly describe the network infrastructure)
- Dashboard (beautiful graphical reports for the authorities)
- FusionInventory (PC inventory)
- Reports (convenient reports for yourself)
- PDF (ability to export to PDF)
- Racks / Bays Management (handy tool for describing racks and cabinets)
- Accounts Inventory (convenient tool for working with user accounts)

Download add-ons from here . After downloading, files must be unzipped and placed in the * / glpi / plugins folder, after which they must be activated in the GLPI web interface and enabled. GLPI installation is complete.

PS It’s not possible to consider GLPI from installation to launching into a production environment in one article, I expect to write a series of articles on GLPI, if not on Habré, then in my personal blog.
PSS Thank you for your attention and waiting for constructive criticism.

The second part of.

Source: https://habr.com/ru/post/312522/


All Articles