GLPI in a small organization, part 1. Typical deployment and pitfalls
Presumably, this will be the first of a series of articles on GLPI, and if the topic turns out to be necessary, I will gladly 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. All.
For these purposes, a small server was built, the last and stable for 2011 Ubuntu Linux was installed on it, based on the manual, where the GLPI complex was located, which includes the MYSQL server with the GLPI database (database), 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 the GLPI bring to our organization?
2. In what capacity do we want to use this system?
3. Can we accompany and support this system?
In the case described above, there were no answers to these three questions.
Now GLPI is not just a “Free fleet manager of computer equipment”, as it used to be, but a harvester that can help you manage your IT infrastructure, support users, plan your budget, manage your department and much more. GLPI capabilities greatly expand the add-ons, which are easy to use and have rich functionality.
When deploying GLPI in an enterprise, I always ask myself the above questions and, it seems to me, made up a typical picture of GLPI deployment.
1.
- GLPI will help in the inventory of office equipment, allowing you to detect, organize and replace outdated computer equipment, which means increase productivity;
- GLPI will allow you to systematize, group, prioritize and track the status of applications for technical support, thereby speeding up the implementation of important and priority applications, which will lead to increased labor productivity.
2.
- GLPI will be used by its familiar role as “computer park manager”;
- GLPI will assume the role of a system of technical user support;
- GLPI will help in managing the IT department (budget, equipment suppliers, service providers, etc.)
3.
- The company already uses a number of systems deployed on GNU / Linux (Zabbix, Openfire, an internal website, MYSQL database server for the above systems), and adding one server will not fundamentally complicate the infrastructure.
If you do not have systems deployed on Unix-like operating systems, you should get the necessary knowledge at the basic administration level.
Having been working with Unix-like operating systems for several years, I can safely say that for GLPI Debian GNU / Linux is reliable enough to not worry about the full functionality of GLPI for many years. But do not forget about critical updates and security updates, and regularly make backups.
Below I will present, in my humble opinion, the basic system configuration and add-ons for a typical GLPI deployment.
First , before preparing for the installation, we must plan everything and decide on the version of the GLPI we need and its additions, so that the entire infrastructure is compatible with GLPI.
Secondly, we need two virtual machines (VMs) with Debian GNU / Linux. One for MYSQL, one for GLPI.
I prefer to allocate the roles of servers with the MYSQL database in connection with the features of the MYSQL server and for some other reasons, for example, it may be useful to us for hosting the database 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 /etc/mysql/my.cnf file.
To enable listening to all addresses, just comment out the line
bind-address = 127.0.0.1
. You can find more information here .
VMs with a MYSQL database need to be configured, given 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 GLPI folders are expected to grow in size. Both VMs will require the installation of the Apache web server and PHP5.
Let me remind you that on a VM with a MYSQL database we will need to additionally install PHPMyAdmin for convenient management of MYSQL databases. There are a lot of step-by-step and complete manuals on the Internet for installing such systems; finding them is not a problem, and this is the topic of a separate article.
Also, do not forget to install the mysql client ( mysqlclient ) on the server intended for GLPI , it will come in handy for interacting with the database server.
Thirdly, I advise you to install GLPI not from repositories, but from the GLPI site, since this will allow for a clean installation, without a “locomotive” of unnecessary dependencies and programs. In addition, on the site you can always find the latest version of GLPI, or choose something from the old releases.
The second pitfall: with this type of installation, you need to remember to give the rights for the web server (www-data) to the folder with the unpacked GLPI, it is most convenient to do this using the chown utility included with Debian GNU / Linux.
Also, do not forget 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.
Let's correct the parameters ServerName, ServerAlias and DocumentRoot in the new file, 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.
Until the full launch of GLPI, I do not recommend deleting the default configuration file and turning off the default site, it can come in handy for more convenient viewing and adjusting PHP parameters in the future.
Fourth , it remains to create a database and a user for GLPI on the server and give it rights, for this it is convenient to use PHPMyAdmin.
So, the database is created, the user received administrative rights to the database.
Third pitfall: for the GLPI to work properly, you need to correct the file in * / glpi / config / config_db.php.
You need to fill in all the fields, indicating the server address with the MYSQL database, database name, username and password. The final touch - you need to mark up the database to use GLPI. It is for this procedure that the mysql client comes in handy. Run the command, fill the dump into a new database:
mysql -u username -h database_ip_server_name_p -p password database_name <* / glpi / install / mysql / glpi- version_GLPI -empty.sql
Please note that I 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 recommend placing it in / var / www /). On the path * / glpi / install / mysql / you can find all the dumps available for filling.
Fifthly , I advise you to create an A-record in DNS, with a short name that preferably matches ServerName, for example glpi, so that you can easily and easily go to the GLPI web interface. We enter glpi in the browser and proceed to configure GLPI.
Sixth , a few words about additions. For a “typical” installation it is convenient to use:
- Archires (Network Architecture) (the ability to clearly describe the network infrastructure)
- Dashboard (beautiful graphic reports for superiors)
- FusionInventory (PC inventory)
- Reports (convenient reports for yourself)
- PDF (export to PDF)
- Racks / Bays Management (a handy tool for describing racks and cabinets)
- Accounts Inventory (a convenient tool for working with user accounts)
You can download add-ons from here . After downloading, you need to unzip the files and place them in the * / glpi / plugins folder, after which you need to activate them in the GLPI web interface and enable them. GLPI installation completed.
PS It is not possible to consider GLPI from installation to launch into a production environment within the framework of one article; I hope to write a series of articles on the subject of GLPI, if not on Habré, then on my personal blog in LJ.
PSS Thank you for your attention and look forward to constructive criticism.
Second part.