Обновление¶
Before starting¶
Identify your GLPI settings.
You will need to identify the database being used by GLPI, your GLPI installation’s directory location, and the locations of GLPI’s config, files, and plugin directories.
If you do not know where your GLPI installation is, you may start your search within the default hosting directory used by your web server, such as «/var/www» for Apache on Linux.
By default, the
configandfilesdirectories are in the root of your GLPI installation but they may be moved as explained in the installation documentation.The database information can be found within the
config_db.phpfile in GLPI’sconfigdirectory.The directories GLPI will look at for plugins are usually the
marketplaceandpluginsdirectories in the root of your GLPI installation but they may be moved by setting theGLPI_PLUGIN_DIRECTORIESconstant in aconfig/local_define.phpfile orinc/downstream.php.
At this point, you should also identify if any updates are required for GLPI’s prerequisites such as the database server, PHP version, etc.
Back up user data
Using a tool appropriate for your database server, create a backup of the GLPI database. Also make a backup of your GLPI installation’s directory. Then, make copies of the files and directories (as previously identified) containing user data. If these are all still located in the default locations inside the GLPI installation’s folder, you do not need to make separate copies of them.
GLPI’s config directory, especially the
glpi.key,glpicrypt.key,oauth.pem, andoauth.pubfiles within it.GLPI’s file directory which contains uploaded documents, certain plugin data, logs, custom palettes and more.
All plugin directories.
The
inc/downstream.phpfile if it exists.
Install the new version
Предупреждение
As soon as a new version of GLPI files is detected, you will not be able to use the application until the update process has been done.
Предупреждение
Нельзя восстанавливать БД если она непуста, так же как и если процесс миграции прерывался.
Перед восстановлением резервной копии удостоверьтесь, что БД пуста и попробуйте обновить, попробуйте снова при ошибке.
Примечание
You can use the
php bin/console db:checkcommand line tool before updating to identify any inconsistencies in your database’s schema and the expected one that may of been caused by past partially-failed updates. These inconsistencies could interfere with the GLPI update process and produce unpredictable results.Update GLPI’s prerequisites as needed or desired.
Move or delete the existing GLPI installation’s directory. This is important as copying the new GLPI release over top an existing installation can cause application errors.
Download the «glpi-<version>.tgz» from the latest GLPI release on the GLPI GitHub releases page. GLPI 11 contains the necessary migrations for version 0.85 and greater, so it is possible to skip even major versions entirely if necessary.
Extract the downloaded release archive to the GLPI installation’s original location, renaming the «glpi» folder as needed for it to match the original GLPI installation’s directory.
Restore the previously backed up config, files, and plugin directories along with the
inc/downstream.phpfile if it existed from the original GLPI.Open the GLPI installation’s URL in your browser or use the
php bin/console db:updatecommand line tool from inside the GLPI installation’s directory to initiate the update. This process may take some time.
Примечание
Before GLPI 11.0, all the plugins were disabled during the update process.
Since GLPI 11.0, as soon as a new version of GLPI files is detected, the plugins execution is suspended. Their execution will be resumed after the update only in case of a minor/bugfixes update. Otherwise, you will have to do it manually using the
php bin/console plugin:resume_executioncommand line tool or from the plugins administration page.
