Как удалить glpi ubuntu

Обновлено: 02.07.2024

Since GLPI 9.2.2, command line tools are provided as supported scripts and are available from the scripts directory of the archive. On previous versions, those scripts were present in the tools directory that is not official and therefore not in the release archive.

Since GLPI 9.4.0, command line tools are being centralized in a console application ( bin/console ). Calling php bin/console from GLPI directory displays the list of available commands.

If APCu is installed on your system, it may fail from command line since default configuration disables it from command-line. To change that, set apc.enable_cli to on in your APCu configuration file.

When using cli tools, please check the system user you are currently logged in with, and permissions on files and directories. With a wrong user, logs, cache and other files may be created with rights that would not allow your webserver to read or write on thos files!

Console options¶

For every console command, following options are available:

  • --config-dir=CONFIG-DIR path of configuration directory to use, relative to current working directory (required only if a custom path is used)
  • -h , --help displays command help
  • --lang=LANG output language code (default value is existing GLPI «language» configuration or «en_GB»)
  • -n , --no-interaction disable command interactive questions
  • --no-plugins disable GLPI plugins during command execution
  • -q , --quiet disable command output
  • -v|vv|vvv , --verbose=VERBOSE verbosity level: 1 for normal output, 2 for more verbose output and 3 for debug

Additional install and update tools¶

Check requirements¶

Before installing or upgrading, requirements are automatically checked; but you can run them separately and see state for all of them using the php bin/console glpi:system:check_requirements command.

Enable/Disable maintenance¶

GLPI provides a maintenance mode that can be activated prior to an update, and deactivated after all has been checked.

Just use the glpi:maintenance:enable and glpi:maintenance:disable commands.

Установить¶

The php bin/console db:install has been made to install GLPI database in CLI mode.

  • -r , --reconfigure to enable overriding of any existing DB configuration file
  • -f , --force to force execution of installation even if database is not empty
  • -L , --default-language=DEFAULT_LANGUAGE default language of GLPI ( en_GB per default)
  • -H , --db-host=DB_HOST host name ( localhost per default)
  • -P , --db-port=DB_PORT database port (default MySQL port if option is not defined)
  • -d , --db-name=DB_NAME database name
  • -u , --db-user=DB_USER database user name
  • -p , --db-password=DB_PASSWORD database user’s pasword (use it without value to be prompted for password)

If mandatory options are not specified in the command call, the console will ask for them.

Database connection parameters may be ommited if a configuration file already exists.

Database connection configuration¶

Добавлено в версии 9.5.0.

The php bin/console db:configure has been made to define database connection parameters in CLI mode.

  • -r , --reconfigure to enable overriding of any existing DB configuration file
  • -H , --db-host=DB_HOST host name ( localhost per default)
  • -P , --db-port=DB_PORT database port (default MySQL port if option is not defined)
  • -d , --db-name=DB_NAME database name
  • -u , --db-user=DB_USER database user name
  • -p , --db-password=DB_PASSWORD database user’s pasword (use it without value to be prompted for password)

If mandatory options are not specified in the command call, the console will ask for them.

Обновить¶

The php bin/console db:update has been made to update GLPI database in CLI mode from a previously installed version.

There is no required arguments, just run the command so it updates your database automatically.

Не забывайте сделать резервную копию БД до попытки обновления!

  • -u , --allow-unstable allow update to an unstable version (use it with cautions)
  • -f , --force force execution of update from v-1 version of GLPI even if schema did not changed

Security key¶

Добавлено в версии 9.4.6.

GLPI key file is available for GLPI >= 9.4.6 but is not mandatory. As of GLPI 9.5, using the key file will be mandatory.

In order to store some sensitive data, GLPI relies on a homemade encryption/decryption tool, which uses a key to:

  • encrypt data before storing them in the database,
  • decrypt data that has been retrieved from the database.

The php bin/console glpi:security:change_key command allows to change the key, if it has been compromised for example. By default, command will:

  • generate a new key and and store it in the key file,
  • update all configured fields (for core and compatible plugins) to use the new key,
  • update all configuration entries listed (for core and compatible plugins) to use the new key.

Various tools¶

Database schema check¶

The php bin/console db:check command can be used to check if your database schema differs from expected one.

If you have any diff, output will looks like :

LDAP synchonization¶

The bin/console glpi:ldap:synchronize_users command can be used to synchronize users against LDAP server informations.

  • -c , --only-create-new only create new users

  • -u , --only-update-existing only update existing users

  • -s , --ldap-server-id[=LDAP-SERVER-ID] synchronize only users attached to this LDAP server (multiple values allowed)

  • -f , --ldap-filter[=LDAP-FILTER] filter to apply on LDAP search

  • --begin-date[=BEGIN-DATE] begin date to apply in «modifyTimestamp» filter

  • --end-date[=END-DATE] end date to apply in «modifyTimestamp» filter

  • -d , --deleted-user-strategy[=DELETED-USER-STRATEGY] force strategy used for deleted users:

  • 0: Preserve
  • 1: Put in trashbin
  • 2: Withdraw dynamic authorizations and groups
  • 3: Disable
  • 4: Disable + Withdraw dynamic authorizations and groups

Task unlock¶

The php bin/console task:unlock command can be used to unlock stucked cron tasks.

Keep in mind that no task should be stucked except in case of a bug or a system failure (database failure during cron execution for example).

  • -a , --all unlock all tasks
  • -c , --cycle[=CYCLE] execution time (in cycles) from which the task is considered as stuck (delay = task frequency * cycle)
  • -d , --delay[=DELAY] execution time (in seconds) from which the task is considered as stuck (default: 1800)
  • -t , --task[=TASK] itemtype::name of task to unlock (e.g: MailCollector::mailgate )

Plugins tools¶

Добавлено в версии 9.5.

Some command line tolls are also available to manage plugins from command line:

  • glpi:plugin:install
  • glpi:plugin:activate
  • glpi:plugin:deactivate

In order to install MyGreatPlugin ; you should end with something like:

Each of those plugin commands can take a plugin name as argument, or the --all flag to be ran on all plugins.

Migration tools¶

From MyISAM to InnoDB¶

Добавлено в версии 9.3.0.

Since version 9.3.0, GLPI uses the InnoDB engine instead of previously used MyISAM engine.

The php bin/console glpi:migration:myisam_to_innodb command can be used to migrate exiting tables to InnoDB engine.

Missing timestamps builder¶

Добавлено в версии 9.1.0.

Prior to GLPI 9.1.0, fields corresponding to creation and modification dates were not existing.

The php bin/console glpi:migration:build_missing_timestamps command can be used to rebuild missing values using available logs.

Use timestamp data type¶

Добавлено в версии 9.5.0.

Many date fields were using the DATETIME type, but this does not allow to rely on timezones. Timezone support requires all fields to use TIMESTAMP data type, but this query can be very long and therefore is not included in the standard update process.

Using the glpi:migration:timestamps command will change those fields to the correct data type, but read documentation on timezones before.

Ensure to backup your database before!

Migrate Domains plugin¶

Добавлено в версии 9.5.0.

Domains in GLPI have evolved from a simple dropdown to a more complex object, including records management among others. Therefore, the Domains plugins feature are now included in core.

To migrate your plugin data; use the glpi:migration:domains_plugin_to_core command. Presence of the plugin is mandatory so checks can be run, you can use the --without-plugin switch but this is not recommended. If you were using an older version of the plugin than the one required, you can use the --update-plugin flag.

At the end, all domains types, domains and item relations will be migrated in core tables.

Migrate Racks plugin¶

Добавлено в версии 9.5.0.

Since GLPI 9.3.0, data center infrastructure management is available as a core feature. A migration script from Racks plugin was provided inside the scripts directory. Since GLPI 9.5.0, this migration script has been refactored and moved inside the CLI console.

To migrate your plugin data; use the glpi:migration:racks_plugin_to_core command. Presence of the plugin is mandatory so checks can be run, you can use the --without-plugin switch but this is not recommended. If you were using an older version of the plugin than the one required, you can use the --update-plugin flag.

Creative Commons License

Since GLPI 9.2.2, command line tools are provided as supported scripts and are available from the scripts directory of the archive. On previous versions, those scripts were present in the tools directory that is not official and therefore not in the release archive.

Since GLPI 9.4.0, command line tools are being centralized in a console application ( bin/console ). Calling php bin/console from GLPI directory displays the list of available commands.

If APCu is installed on your system, it may fail from command line since default configuration disables it from command-line. To change that, set apc.enable_cli to on in your APCu configuration file.

When using cli tools, please check the system user you are currently logged in with, and permissions on files and directories. With a wrong user, logs, cache and other files may be created with rights that would not allow your webserver to read or write on thos files!

Console options¶

For every console command, following options are available:

  • --config-dir=CONFIG-DIR path of configuration directory to use, relative to current working directory (required only if a custom path is used)
  • -h , --help displays command help
  • --lang=LANG output language code (default value is existing GLPI “language” configuration or “en_GB”)
  • -n , --no-interaction disable command interactive questions
  • --no-plugins disable GLPI plugins during command execution
  • -q , --quiet disable command output
  • -v|vv|vvv , --verbose=VERBOSE verbosity level: 1 for normal output, 2 for more verbose output and 3 for debug

Additional install and update tools¶

Check requirements¶

Before installing or upgrading, requirements are automatically checked; but you can run them separately and see state for all of them using the php bin/console glpi:system:check_requirements command.

Enable/Disable maintenance¶

GLPI provides a maintenance mode that can be activated prior to an update, and deactivated after all has been checked.

Just use the glpi:maintenance:enable and glpi:maintenance:disable commands.

Install¶

The php bin/console db:install has been made to install GLPI database in CLI mode.

  • -r , --reconfigure to enable overriding of any existing DB configuration file
  • -f , --force to force execution of installation even if database is not empty
  • -L , --default-language=DEFAULT_LANGUAGE default language of GLPI ( en_GB per default)
  • -H , --db-host=DB_HOST host name ( localhost per default)
  • -P , --db-port=DB_PORT database port (default MySQL port if option is not defined)
  • -d , --db-name=DB_NAME database name
  • -u , --db-user=DB_USER database user name
  • -p , --db-password=DB_PASSWORD database user’s pasword (use it without value to be prompted for password)

If mandatory options are not specified in the command call, the console will ask for them.

Database connection parameters may be ommited if a configuration file already exists.

Database connection configuration¶

New in version 9.5.0.

The php bin/console db:configure has been made to define database connection parameters in CLI mode.

  • -r , --reconfigure to enable overriding of any existing DB configuration file
  • -H , --db-host=DB_HOST host name ( localhost per default)
  • -P , --db-port=DB_PORT database port (default MySQL port if option is not defined)
  • -d , --db-name=DB_NAME database name
  • -u , --db-user=DB_USER database user name
  • -p , --db-password=DB_PASSWORD database user’s pasword (use it without value to be prompted for password)

If mandatory options are not specified in the command call, the console will ask for them.

Update¶

The php bin/console db:update has been made to update GLPI database in CLI mode from a previously installed version.

There is no required arguments, just run the command so it updates your database automatically.

Do not forget to backup your database before any update try!

  • -u , --allow-unstable allow update to an unstable version (use it with cautions)
  • -f , --force force execution of update from v-1 version of GLPI even if schema did not changed

Security key¶

New in version 9.4.6.

GLPI key file is available for GLPI >= 9.4.6 but is not mandatory. As of GLPI 9.5, using the key file will be mandatory.

In order to store some sensitive data, GLPI relies on a homemade encryption/decryption tool, which uses a key to:

  • encrypt data before storing them in the database,
  • decrypt data that has been retrieved from the database.

The php bin/console glpi:security:change_key command allows to change the key, if it has been compromised for example. By default, command will:

  • generate a new key and and store it in the key file,
  • update all configured fields (for core and compatible plugins) to use the new key,
  • update all configuration entries listed (for core and compatible plugins) to use the new key.

Various tools¶

Database schema check¶

The php bin/console db:check command can be used to check if your database schema differs from expected one.

If you have any diff, output will looks like :

LDAP synchonization¶

The bin/console glpi:ldap:synchronize_users command can be used to synchronize users against LDAP server informations.

  • -c , --only-create-new only create new users

  • -u , --only-update-existing only update existing users

  • -s , --ldap-server-id[=LDAP-SERVER-ID] synchronize only users attached to this LDAP server (multiple values allowed)

  • -f , --ldap-filter[=LDAP-FILTER] filter to apply on LDAP search

  • --begin-date[=BEGIN-DATE] begin date to apply in “modifyTimestamp” filter

  • --end-date[=END-DATE] end date to apply in “modifyTimestamp” filter

  • -d , --deleted-user-strategy[=DELETED-USER-STRATEGY] force strategy used for deleted users:

  • 0: Preserve
  • 1: Put in trashbin
  • 2: Withdraw dynamic authorizations and groups
  • 3: Disable
  • 4: Disable + Withdraw dynamic authorizations and groups

Task unlock¶

The php bin/console task:unlock command can be used to unlock stucked cron tasks.

Keep in mind that no task should be stucked except in case of a bug or a system failure (database failure during cron execution for example).

  • -a , --all unlock all tasks
  • -c , --cycle[=CYCLE] execution time (in cycles) from which the task is considered as stuck (delay = task frequency * cycle)
  • -d , --delay[=DELAY] execution time (in seconds) from which the task is considered as stuck (default: 1800)
  • -t , --task[=TASK] itemtype::name of task to unlock (e.g: MailCollector::mailgate )

Plugins tools¶

New in version 9.5.

Some command line tolls are also available to manage plugins from command line:

  • glpi:plugin:install
  • glpi:plugin:activate
  • glpi:plugin:deactivate

In order to install MyGreatPlugin ; you should end with something like:

Each of those plugin commands can take a plugin name as argument, or the --all flag to be ran on all plugins.

Migration tools¶

From MyISAM to InnoDB¶

New in version 9.3.0.

Since version 9.3.0, GLPI uses the InnoDB engine instead of previously used MyISAM engine.

The php bin/console glpi:migration:myisam_to_innodb command can be used to migrate exiting tables to InnoDB engine.

Missing timestamps builder¶

New in version 9.1.0.

Prior to GLPI 9.1.0, fields corresponding to creation and modification dates were not existing.

The php bin/console glpi:migration:build_missing_timestamps command can be used to rebuild missing values using available logs.

Use timestamp data type¶

New in version 9.5.0.

Many date fields were using the DATETIME type, but this does not allow to rely on timezones. Timezone support requires all fields to use TIMESTAMP data type, but this query can be very long and therefore is not included in the standard update process.

Using the glpi:migration:timestamps command will change those fields to the correct data type, but read documentation on timezones before.

Ensure to backup your database before!

Migrate Domains plugin¶

New in version 9.5.0.

Domains in GLPI have evolved from a simple dropdown to a more complex object, including records management among others. Therefore, the Domains plugins feature are now included in core.

To migrate your plugin data; use the glpi:migration:domains_plugin_to_core command. Presence of the plugin is mandatory so checks can be run, you can use the --without-plugin switch but this is not recommended. If you were using an older version of the plugin than the one required, you can use the --update-plugin flag.

At the end, all domains types, domains and item relations will be migrated in core tables.

Migrate Racks plugin¶

New in version 9.5.0.

Since GLPI 9.3.0, data center infrastructure management is available as a core feature. A migration script from Racks plugin was provided inside the scripts directory. Since GLPI 9.5.0, this migration script has been refactored and moved inside the CLI console.

To migrate your plugin data; use the glpi:migration:racks_plugin_to_core command. Presence of the plugin is mandatory so checks can be run, you can use the --without-plugin switch but this is not recommended. If you were using an older version of the plugin than the one required, you can use the --update-plugin flag.

Creative Commons License

This plugin, named «uninstall» or «Item Uninstallation», allows you to remove / replace devices from the inventory by automating certain actions on the fields.

It allows to manage the different stages of the life cycle of a hardware. It has been designed, among other things, to handle the following cases:

  • scrapping of equipment
  • removal from inventory of temporary equipment due to breakdown
  • Replacement of equipment under a warranty for example (See: Replacement Equipment Feature)

Once installed, the plugin includes :

  • a rights management directly accessible from Administration -> Profiles (in the Plugins tab -> uninstall),
  • a «hardware uninstall» menu in «Configuration»,
  • an «uninstall» menu in the user preferences.

Right managment¶

It is possible to deny access to the plugin or to allow it by specifying the read or write option on the templates.

To do this, simply go to the menu «Administration» > «Profiles», to select the profile you wish to modify, then in the «Uninstallation» tab set the following options :

  • No access: the plugin does not appear in the menu „Plugin“.
  • Playback: only the use of previously created templates is possible
  • Writing: Template creation is possible.
  • Hardware replacement: standard hardware replacement is possible

Uninstall feature¶

This functionality of the plugin „Item Uninstallation“ adds the possibility of modifying the value of certain fields and of removing the inventory of a computer of the OCS base or the cleaning of the FusionInventory tables.

The uninstall templates can be accessed in the «Administration > Uninstall Hardware» menu.

You can create as many uninstall templates as you want. Each template can contain different features, and be visible in the sub-entities or not.

Uninstall equipment is a transfer of the equipment to itself. During its transfer, a certain number of actions are performed, as specified in the definition of transfer.

  • Name: the name of the uninstall template
  • Sub-entities: indicates whether the template is visible in the creation entity and its sub-entities
  • Model type: indicates which type of model should be used (either Uninstall or Replace)
  • Comments: free fields to add details about the model
  • Transfer template to be used: Indicates the transfer template to be used when uninstalling the system.
  • New hardware status: indicates which status the hardware should take once uninstalled
  • New group: indicates the group to which the hardware can belong once uninstalled.
  • Software History Deletion : Allows deletion of all lines in a computer’s history that are relevant to software installations/uninstallations.
  • REMOVE Name : removes the name of the hardware during uninstallation
  • RAZ Contact : removes the contact reassembled by OCS during uninstallation
  • Network reset: resets the «network» field of the equipment record to zero.
  • RAZ OS: Removes OS information (OS, Version, Service Pack, Product Key, Product ID) when uninstalling.
  • RAZ domain : removes the «domain» field from the hardware
  • Remove IP & Gateway & Hacker & Subnet: removes network information (except for the MAC address, which is hardware-related) during uninstallation
  • Remove the machine from OCS : when uninstalling a computer in GLPI, remove from the OCS base the corresponding machine
  • Delete FusionInventory info: Delete all FusionInventory info for this material

Uninstall hardware¶

  • from its file, in the tab «Uninstallation».
  • from the massive modifications list

Since a template can be recursive (visible in the sub-entities), the list of templates displayed in the massive actions indicates all the templates available in the current entity (either those defined in this entity, or in an entity above it and visible in the sub-entities).

Change of location on uninstallation¶

It is possible to change the location of the hardware once it has been uninstalled. This selection is made either :

  • in the hardware file, once the uninstallation model has been chosen.
  • from the user’s preferences for uninstallation by massive modification

It should be noted that a location is declared within an entity. It is therefore possible, depending on the current entity, to define an uninstall location.

Replace feature¶

This feature of the „Item Uninstallation“ plugin adds the possibility to replace one hardware by another.

Replacement Model Form¶

Replacement models are managed in the same way as uninstall models: They are accessible in the menu «Administration > Uninstall hardware». Each model can contain different characteristics, and be visible in the sub-entities or not.

In this form there are 4 tabs : * Main: allows to display on the page only the main information of the template. * Replacing data: displays the various actions to be performed when replacing one piece of equipment with another. * All: displays all the tabs on the same page

../_images/replace_main.jpg

Here is the description of the fields of the main tab :

Name: the name of the replacement model Sub-entities: indicates whether the template is visible in the creation entity and its sub-entities Model type: indicates what type of model should be used (here we are talking about type - Replacement) Comments: free fields to add details about the model New hardware status: indicates which status the old hardware should take once it has been replaced

Replacing data tab¶

../_images/replace_data.jpg

Here is the description of the fields of the actions tab.

  • Copy name: allows you to define if you want to copy the name of the old hardware to the new one.
  • Copy the serial number: Allows you to define if you wish to copy the serial number of the old equipment to the new one.
  • Copy the inventory number: allows you to define if you want to copy the inventory number of the old equipment to the new one.
  • Overwrite information (from the old material to the new one): this option allows you to choose the behavior to adopt if one of the unique information (Reservation, Financial Information, Name, Serial, Otherserial, Entity…) is present in the old material AND in the new material : Yes : by selecting YES, the information in the old material will replace that in the new material. No: by selecting NO, the information of the new hardware will NEVER be overwritten by the information of the old hardware.

Method of archiving old material

In this option, we define the behavior that the uninstall plugin must adopt with the old hardware :

  • Purge + PDF / CSV: if you have the PDF plugin the old hardware will be purged from the GLPI database and its information will be attached to the new hardware in a PDF document. If you do not have the PDF plugin, they will be stored in CSV format.
  • Deletion + Comments: the old hardware is put in the trash and a comment is added in each of the two hardware («This hardware has been replaced by…» and «This hardware has replaced the hardware…»).

Data location - Connection with other hardware

  • Copy Documents: Allows you to attach documents from old equipment to new equipment.
  • Copy Contracts: allows you to attach the contracts from the old equipment to the new equipment.
  • Copy financial information: allows you to attach financial information from the old equipment to the new equipment. Warning: if the «Overwrite information» option is activated, even if the new hardware has financial information, it will be replaced by the old hardware.
  • Copy Reservations: Allows you to attach the reservations made on the old equipment to the new equipment. Attention: same remark as for the financial information.
  • Copy the user: allows you to pass on the user of the old equipment to the new one. Caution: same remark as for the financial information.
  • Copy group: Allows you to assign the group of the old equipment to the new equipment. Caution: same remark as for the financial information.
  • Copy the tickets: Allows you to attach the tickets of the old equipment to the new equipment.
  • Copy network connections: Allows you to transfer the network connections from the old hardware to the new hardware.
  • Copy direct connections: Allows you to transfer the direct connections (Monitor, Printer, Device, Phone) from the old hardware to the new hardware.

Replace hardware¶

As well as uninstalling equipment, there are two ways to replace equipment:

  • from the card of this one, in the tab «Plugins -> Uninstallation»,
  • from the massive modification list.

Since a replacement template can be recursive (visible in the sub-entities), the list of templates displayed in the massive actions indicates all the templates available in the current entity (either those defined in this entity, or in an entity above it and visible in the sub-entities).

Once you have selected the hardware to be replaced via the massive actions, or you use the «Uninstall» tab directly in it :

  • a summary of the selected template appears in order to show you the actions that will be performed by the plugin.
  • the list of the selected hardware(s) appears and you can choose the replacement hardware in the same way as when you choose a hardware in a Support Ticket.

Change of location on replacement¶

It is possible to change the location of the equipment once it has been replaced. This selection is made either : * in the equipment sheet, once the replacement model has been chosen, * from the user’s preferences for massive modification replacement.

Note that a location is declared within an entity. It is therefore possible, depending on the current entity, to define a replacement location.

date

23.09.2020

directory

CentOS, Linux, Ubuntu

comments

комментария 34
  • Инвентаризация компьютеров, серверов, оргтехники (принтеры, мониторы, МФУ, картриджи и прочее)
  • Инвентаризация установленных на компьютерах программ и лицензий
  • Управление заявками и инцидентами (регистрация обращений пользоватетелей, HelpDesk)
  • База знаний
  • Ведение проектов
  • Управление бюджетом

Установка и настройка стека LAMP в Linux

GLPI это обычное веб приложение с базой данных, поэтому на сервере нужно развернуть LAMP стек (в данной статье GLPI будет установлен на apache, но возможна также установка на nginx).

Совет. В этом примере мы покажем, как установить GLPI на Ubuntu. Однако инструкция полностью подходит для развертывания GLPI на любом другом дистрибутиве Linux. Например, для CentOS используйте пакетный менеджер yum, вместо apt (или dnf в CentOS 8).

apt update
apt install mysql-server mysql-client apache2 php php-mysql libapache2-mod-php php-json php-gd php-curl php-mbstring php-cas php-xml php-cli php-imap php-ldap php-xmlrpc php-apcu

Создайте новую mysql базу данных (можно использовать и mariadb) и пользователя для GLPI:

mysql -u root -p
CREATE DATABASE glpi;
CREATE USER 'glpi'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON glpi.* TO 'glpi'@'localhost';
FLUSH PRIVILEGES;
exit;

Скачайте и распакуйте дистрибутив GLPI:

Скопируйте GLPI в веб директорию:

mkdir /var/www/glpi
cp -R glpi/* /var/www/glpi
chown -R www-data:www-data /var/www/glpi

Совет. Довольно часто при развертывании GLPI встречаются ошибки, связанные со стандартными настройками PHP, поэтому рекомендуем сразу увеличчить лимиты для PHP. Вставьте следующие параметры в конец файла /etc/php/7.2/apache2/php.ini:

Создайте файл виртуал хоста:

И вставляем следующую конфигурацию Virtual Host:

a2ensite glpi
service apache2 reload

Проверьте, что виртуалхост активен.

настройка apache для glpi

Откройте браузер и переходим по URL адресу, который вы указали в виртуал хосте. В моём случае это glpi.local .

glpi web installer

Перед вами должно появится окно веб-установщика GLPI.

Установка GLPI

Сначала нужно выбрать язык интерфейса GLPI и принять лицензионное соглашение. На следующем шаге нажмите Install и убедитесь, чтобы все тесты прошли успешно.

glpi prerequisites

Укажите данные для подключения к базе данных.

параметры подключения к базе данных glpi

Выберите ранее созданную базу данных:

выберите базу glpi

Нажмите Continue и дождитесь импорта данных. База данных может наполняться продолжительное время (несколько минут). Это можно проверить командой show processlist; в mysql.

наполнение базы данных glpi

После этого установка GLPI практически завершена. Зайдите в панель управления (по-умолчанию, логин и пароль – glpi).

панель управления glpi

Базовая настройка GLPI

Для начала необходимо изменить пароли для встроенных пользователей, это можно сделать на вкладке Administration -> Users.

управление пользователями glpi

сменить пароль glpi

Если вы не хотите использовать встроенных пользователей, можно их разом отключить.

отключить лишних пользователей glpi

Примечание. GLPI рекомендует удалить файл install/install.php в целях безопасности. Сделайте командой: rm /var/www/glpi/install/install.php

Обзор интерфейса GLPI

Пробежимся по интерфейсу GLPI и рассмотрим некоторые из возможностей системы.

Вкладка Assets

GLPI assets

Эта вкладка отвечает за инвентаризацию оборудования и софта. В GLPI есть возможность создавать шаблоны. Вы можете создавать различные шаблоны для разных устройств (компьютеров, роутеров, мониторов и т.д). Удобство в том, что при создании новых объектов вам не нужно заново заполнять статические данные (например, расположение или тип объекта).

шаблон инвентаризации компьютера

Механизм шаблонов поддерживается и другими функциями, не только инвентаризацией.

gppi шаблоны

gppi скопировать шаблон

Вкладка Assistance

Вкладка отвечает за управление задачами, инцидентами и проектами. Если вы знакомы с Jira, то здесь такой же принцип.

glpi Assistance - itsm управление задачами и инцидентами

Есть возможность кастомизировать некоторые поля тикетов и создавать шаблоны для них (в Setup -> Dropdowns).

Вкладка Management

Также относится к инвентаризации – можно вести бюджет, учитывать лицензии, поставщиков и т.д.

glpi Management

Вкладка Tools

Эта вкладка содержит в себе разные инструменты – проекты, напоминания, отчеты и базу знаний (wiki).

tools glpi

Управление базой знаний:

база знаний в glpi

Вкладка Administration

Здесь вы можете управлять пользователями, группами и сущностями GLPI, также есть лог действий пользователей GLPi.

логи действий пользователей в glpi

Вкладка Setup

Также отвечает за управление GLPI – настройка пунктов меню, изменение различных форм и полей.

настройки интерфейса glpi

Рассмотрим одно из применений GLPI в реальной жизни – обнаружение устройств в сети и автоматическое заполнение инвентаризационных данных по оборудованию и установленным программам.

В GLPI не предусмотрено автоматическое обнаружение, но с этим может помочь плагин FusionInventory.

Установка Fusion Inventory

включить плагин fusioninventory

Теперь во вкладке Administration появился пункт FusionInventory.

FusionInventory в glpi

Перед установкой агентов на компьютеры и сервера нужно сразу включить нужные модули агентов.

Перейдите в Administration -> FusionInventory -> General -> General Configuration

настройки сбора данных с агентов в FusionInventory

  • Computer Inventory
  • Network inventory (SNMP)
  • Network discovery
  • Package deployment
  • Collect data

Установка Fusion Agent в Windows

Установить Fusion Agent можно либо через графический интерфейс (инсталлятор), либо через командную строку. Мы будем рассматривать второй вариант, так как он легко масштабируется для разворачивания через групповые политики или SCCM.

fusioninventory-agent_windows-x64_2.5.2.exe /S /acceptlicense /add-firewall-exception /debug=2 /execmode=Service /installtasks=Full /timeout=30 /delaytime=5 /server="_http://glpi.local/plugins/fusioninventory/" /runnow

Рассмотрим основные параметры уставки

  • /S – Silent установка, без графического интерфейса
  • /debug=2 – для подробных логов. При боевых развертываниях убирайте этот ключ
  • /execmode=Service – ставим агент как службу Windows
  • /installtasks=Full – устанавливаем все возможные сборщики
  • /delaytime=5 – Задержка перед первым обращения к серверу. Если разворачиваете на большое число компьютеров, ставьте число повыше
  • /server – адрес сервера GLPI
Совет. После установки, в случае возникновения проблем, можно посмотреть лог агента по пути C:\Program Files\FusionInventory-Agent\logs. Параметры агента хранятся в реестре, по пути Computer\HKEY_LOCAL_MACHINE\SOFTWARE\FusionInventory-Agent.

Перейдите в Administration -> FusionInventory -> General -> Agent Management, здесь вы можете управлять агентами

управление агентами FusionInventory

Убедитесь, что данные с данного компьютера появились в GLPI. Перейдите в Assets -> Computers.

данные с копьютера в базе данных glpi через агент FusionInventory

Здесь отображаются все компьютеры, на которые вы установили агенты FusionInventory с модулем Collect Data. Откройте один из компьютеров и посмотрите на собранные данные. Как вы видите, в базе данных GLPI появилась информация об версии и билде Windows с сервера с агентом.

получена информацию об ОС через FusionInventory

информация об оборудовании компьютеров и серверов в glpi

Вся информация заполняется автоматически из данных, которые приходят с агента. Также эта информация сортируется по категориям. Например, при установке агента на обычный ПК, можно получить информацию о периферийных устройствах. На скриншоте ниже информация о мониторах, подключенных к компьютеру где установлен агент.

информация о подключенных мониторах

Также вы видит список установленного на компьютере ПО.

glpi информация об на компьютерах установленных программах

Установка Fusion Agent на Linux

Рассмотрим установку из пакета на Ubuntu Server 18.04. Установите необходимые зависимости

dpkg -i fusioninventory-agent_2.5.2-1_all.deb

В конфигурационном файле агента (/etc/fusioninventory/agent.cfg) измените следующие параметры:

systemctl restart fusioninventory-agent

Если всё сделано правильно, вы увидите ваш Ubuntu компьютер/сервер в Assets-> Computers.

glpi fusioninventory сбор данных с Linux компьютеров

Статистика и отчеты в GLPI

В GLPI есть встроенные отчеты.

отчеты glpi

Но скорее всего вам потребуются отчеты по собственным параметрам. Для этого в GLPI есть плагины:

Пример встроенного отчета из плагина Reports:

glpi встроенные отчеты

GLPI развивается более 15 лет и содержит в себе огромное количество возможностей для управления ИТ инфраструктуры, а сообщество развивает и поддерживает плагины для различных интеграций и функционала. Система имеет огромные возможности модификации своих элементов, поэтому каждая компания настраивает GLPI под себя.

Читайте также: