Aggiornare Lizmap Web Client
Aggiornare da Lizmap 2.x
Vedere documentazione di Lizmap 3.1.
Aggiornamento da versioni di Lizmap inferiori alla 3.5
You should first migrate to 3.5. See documentation of Lizmap 3.5.
Upgrading to Lizmap 3.10
Before upgrading to Lizmap 3.10, check these points:
PHP 8.2 is now the minimum version. Upgrade PHP first if needed, read Installing necessary packages.
QGIS Server 3.40 is now the minimum version.
Lizmap configuration files with a target version lower than 3.7 are not displayed anymore on the landing page. They are still listed in the administration panel with a warning. Open them with a recent version of the Lizmap plugin in QGIS desktop and save them again.
The upgrade itself is done with the usual steps described below (backup, replace files, launch the installer).
After the upgrade:
The storage format of the tile cache has changed: the cache directory, or the Sqlite file, of a layer is now named with a hash of the layer name. A cache generated before the upgrade is not used anymore. You must generate the cache again (read Gestione della cache come amministratore). The old cache is not deleted automatically: you can remove it with the command
php lizmap/console.php wmts:cache:clean repository project, which removes the whole cache of a project, or remove the old directories by hand.Tiles in WebP format are now stored as WebP in the cache (they were stored as JPEG before). If some layers use the WebP format with the server cache, clear their cache.
The installer creates a new
permalinktable, used to store short permalinks (read Short permalink), and a new right Manage server side permalinks for administrators.The user interface now uses Bootstrap 5 instead of Bootstrap 2. If you have written your own JavaScript, CSS themes or templates, check them, read Aggiungere il proprio JavaScript and Creare temi semplici.
For developers of additional modules, some old PHP classes have been removed:
lizmapRepository(use\Lizmap\Project\Repository),lizmapOGCRequest(use\Lizmap\Request\OGCRequest),lizmapProxy(use\Lizmap\Request\Proxy),qgisServerandqgisProject. The classeslizmapProject(use\Lizmap\Project\Project) andlizmapWkt(use\Lizmap\App\WktTools) are deprecated.
Aggiornamento da Lizmap 3.5 o versione 3.6
Here is how to upgrade.
First, you must install PHP and Composer (apt install composer in Debian, or install by hand from https://getcomposer.org ). Then you can start the migration.
Install new sources of Lizmap.
Si può scaricare l’archivio Lizmap dalla pagina_`release <https://github.com/3liz/lizmap-web-client/releases>`.
Si dovrebbe quindi :
rename the
lizmap-web-client/directory tolizmap-web-client.bak/for exampleextract files from the archive and rename the
lizmap-web-client-3.10.0directory tolizmap-web-client/, so it replaces the previous installation.
mv lizmap-web-client lizmap-web-client.bak
zip -r lizmap-web-client-3.10.0.zip
mv lizmap-web-client-3.10.0 lizmap-web-client
Migration
Go into the lizmap-web-client/lizmap/install/ directory and execute migrate_from_previous_version.sh.
You must give the path of the old lizmap directory.
cd lizmap-web-client/lizmap/install/
migrate_from_previous_version.sh ../../../lizmap-web-client.bak/lizmap/
It will copy all configuration files and additionnal modules from the old installation, and update these modules.
Avviare il programma di installazione
You have to launch the installer, which will upgrade some stuff: database tables, data etc..
You should stay in the lizmap-web-client/lizmap/install/ directory.
sudo clean_vartmp.sh
php configurator.php
php installer.php
Pulizia e test
Dovresti quindi eliminare tutta la cache e i file temporanei:
sudo clean_vartmp.sh
Quindi dovresti eseguire lo script che imposta i diritti sui file. I parametri sono l’utente web e il gruppo web utilizzato dal server web per eseguire Lizmap. Su un server Debian, spesso sono www-data.
sudo set_rights.sh www-data www-data
Quindi carica Lizmap nel tuo browser, dovresti vedere le tue mappe senza errori.
Revert upgrade
- If the new installation does not work, you can restore the old installation, by simply rename the
lizmap-web-client.bak/tolizmap-web-client/
mv lizmap-web-client lizmap-web-client.newbug
mv lizmap-web-client.bak lizmap-web-client
Migrare da Sqlite a Postgresql
Potreste aver installato Lizmap con Sqlite. Dovresti quindi avere questi file lizmap/var/db/jauth.db e lizmap/var/db/logs.db, dove sono memorizzati alcuni dati come utenti, permessi e log. E dovresti avere questa configurazione in lizmap/var/config/profiles.ini.php:
[jdb:jauth]
driver=sqlite3
database="var:db/jauth.db"
[jdb:lizlog]
driver=sqlite3
database="var:db/logs.db"
Se avete una tale configurazione, potete migrare i dati in un database Postgresql.
Per prima cosa, create un database Postgresql, e poi cambiate la configurazione in lizmap/var/config/profiles.ini.php, impostando i parametri di accesso al database Postgresql. Si raccomanda di creare uno schema nel database, per esempio lizmap, se contiene già alcune tabelle.
Per esempio:
[jdb:jauth]
driver=pgsql
host=localhost
port=5432
database="your_database"
user=my_login
password=my_password
search_path=lizmap,public
[jdb:lizlog]
driver=pgsql
host=localhost
port=5432
database="your_database"
user=my_login
password=my_password
search_path=lizmap,public
Vedi il capitolo sull’installazione per saperne di più su questi parametri.
Poi puoi lanciare questi script che migreranno i dati.
php lizmap/console.php database:migrateusers
php lizmap/console.php database:migratelog
Se non ci sono errori, puoi andare su lizmap con il tuo browser, e controllare se puoi autenticarti. Dovresti vedere anche la lista degli utenti nel pannello di amministrazione. In questo caso, puoi fare un backup dei file jauth.db e logs.db e cancellarli.
Se qualcosa va storto e non puoi risolvere il problema, ripristina l’accesso al database in lizmap/var/config/profiles.ini.php come prima, in questo modo:
[jdb:jauth]
driver=sqlite3
database="var:db/jauth.db"
[jdb:lizlog]
driver=sqlite3
database="var:db/logs.db"
E Lizmap dovrebbe funzionare bene, ma sempre con Sqlite.