Lizmap Web Clientのアップグレード
Lizmap 2.xからのアップグレード
Lizmap 3.1のドキュメント をご覧ください。
Lizmap 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 管理者としてのキャッシュ管理). 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 独自の Java スクリプトを追加する and シンプルなテーマの作成.
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.
Upgrading from Lizmap 3.5 or 3.6 version
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.
Lizmap アーカイブを入手するには、 release <https://github.com/3liz/lizmap-web-client/releases> _ ページでアーカイブをダウンロードしてください。
次のことを行う必要があります:
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.
インストーラーの起動
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
クリーンアップとテスト
その後、キャッシュと一時ファイルをすべて削除してください。
sudo clean_vartmp.sh
そして、ファイルに権利を設定するスクリプトを呼び出す必要があります。パラメータは、WebサーバーがLizmapを実行する際に使用するWebユーザーとWebグループです。Debianサーバでは、www-dataであることが多いです。
sudo set_rights.sh www-data www-data
その後、Lizmapをブラウザに読み込むと、エラーなく地図が表示されるはずです。
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
SqliteからPostgresqlへの移行
もしかしたらSqliteと一緒にLizmapをインストールしたかもしれません。そして、これらのファイル lizmap/var/db/jauth.db と lizmap/var/db/logs.db には、ユーザー、権限、ログなどのデータが保存されているはずです。そして、この設定を lizmap/var/config/profiles.ini.php に記述する必要があります。
[jdb:jauth]
driver=sqlite3
database="var:db/jauth.db"
[jdb:lizlog]
driver=sqlite3
database="var:db/logs.db"
このような設定であれば、Postgresqlのデータベースにデータを移行することができます。
まず、Postgresqlのデータベースを作成します。次に、Postgresqlのデータベースへのアクセスパラメータを設定して、 lizmap/var/config/profiles.ini.php の設定を変更します。データベースにすでにいくつかのテーブルが含まれている場合には、例えば、 lizmap のようなスキーマを作成することをお勧めします。
例えば、
[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
これらのパラメータの詳細については、インストールの章を参照してください。
そして、データを移行するスクリプトを起動することができます。
php lizmap/console.php database:migrateusers
php lizmap/console.php database:migratelog
エラーがなければ、ブラウザでlizmapにアクセスして、自分が認証できることを確認します。管理パネルのユーザーリストにも表示されているはずです。もし問題がある場合は、jauth.dbとlogs.dbをバックアップして、削除してください。
何か問題が発生し、問題を解決できない場合は、以下のように、データベースアクセスを以前のように lizmap/var/config/profiles.ini.php に戻してください。
[jdb:jauth]
driver=sqlite3
database="var:db/jauth.db"
[jdb:lizlog]
driver=sqlite3
database="var:db/logs.db"
これでLizmapもうまく動作するはずですが、まだSqlite版のままです。