Benutzer-Werkzeuge

Webseiten-Werkzeuge


de:upgrade_von_ejabberd_23.01_auf_ejabberd_23.04

Upgrade von ejabberd 23.01 auf ejabberd 23.04

Voraussetzung

  • Dieses Howto setzt ejabberd Installation voraus.
  • Bei diesem Upgrade sind keine Konfigurationsanpassungen notwendig.

Einleitung

Die Installation neuerer Versionen ist wegen der neuen Verzeichnisstruktur sehr einfach durchzuführen.

Einrichtung

ejabberd stoppen:

$ systemctl stop ejabberd.service

Wir machen uns zu ejabberd um damit zu arbeiten:

$ su - ejabberd

ejabberd herunterladen und ausführbar machen:

$ wget -O ejabberd-23.04-1-linux-x64.run https://www.process-one.net/downloads/downloads-action.php?file=/23.04/ejabberd-23.04-1-linux-x64.run
$ chmod +x ejabberd-23.04-1-linux-x64.run

Installation starten:

$ ./ejabberd-23.04-1-linux-x64.run

Running without superuser privileges (installer wasn't invoked
with "sudo"), cannot perform system-wide installation this way.
Continue anyway? (y/n) [n] y

Install ejabberd below /home/ejabberd/opt? (y/n) [n] y

The following installation paths will be used:
- /home/ejabberd/opt/ejabberd-23.04
- /home/ejabberd/opt/ejabberd (existing files won't be modified)
Install ejabberd 23.04 now? (y/n) [n] y

Symbolischen Link anpassen:

$ rm opt/ejd
$ ln -s /home/ejabberd/opt/ejabberd-23.04 /home/ejabberd/opt/ejd

Sofern du für die Datenbank MariaDB verwendest, sind einige Anpassungen notwendig. Kontrolliere bitte vorab, ob du das klassische oder das neue MySQL Schema verwendest.

Datei für den Import erstellen:

klassisches Schema:

$ jed update.sql

folgende Zeilen einfügen:

ALTER TABLE rosterusers DROP INDEX i_rosteru_username;
ALTER TABLE sr_user DROP INDEX i_sr_user_jid;
ALTER TABLE privacy_list DROP INDEX i_privacy_list_username;
ALTER TABLE private_storage DROP INDEX i_private_storage_username;
ALTER TABLE muc_online_users DROP INDEX i_muc_online_users_us;
ALTER TABLE route DROP INDEX i_route_domain;
ALTER TABLE mix_participant DROP INDEX i_mix_participant_chan_serv;
ALTER TABLE mix_participant DROP INDEX i_mix_subscription_chan_serv_ud;
ALTER TABLE mix_participant DROP INDEX i_mix_subscription_chan_serv;
ALTER TABLE mix_pam DROP INDEX i_mix_pam_u;

Die Änderungen mit [STRG] + [x] und [STRG] + [s] speichern und den Editor mit [STRG] + [x] und [STRG] + [c] verlassen.

oder neues Schema:

$ jed update.sql

folgende Zeilen einfügen:

ALTER TABLE rosterusers DROP INDEX i_rosteru_sh_username;
ALTER TABLE sr_user DROP INDEX i_sr_user_sh_jid;
ALTER TABLE privacy_list DROP INDEX i_privacy_list_sh_username;
ALTER TABLE private_storage DROP INDEX i_private_storage_sh_username;
ALTER TABLE muc_online_users DROP INDEX i_muc_online_users_us;
ALTER TABLE route DROP INDEX i_route_domain;
ALTER TABLE mix_participant DROP INDEX i_mix_participant_chan_serv;
ALTER TABLE mix_participant DROP INDEX i_mix_subscription_chan_serv_ud;
ALTER TABLE mix_participant DROP INDEX i_mix_subscription_chan_serv;
ALTER TABLE mix_pam DROP INDEX i_mix_pam_us;
CREATE INDEX i_push_session_sh_username_timestamp ON push_session (server_host, username(191), timestamp);

Die Änderungen mit [STRG] + [x] und [STRG] + [s] speichern und den Editor mit [STRG] + [x] und [STRG] + [c] verlassen.

Die Updatedate in deine Datenbank importieren:

$ mysql -D ejabberd -u ejabberd -p < update.sql
Enter password: <geheim>

Anschließend kann die Datei wieder gelöscht werden:

$ rm update.sql

Den Kontext von ejabberd verlassen und ejabberd wieder starten:

$ exit
$ systemctl start ejabberd.service
de/upgrade_von_ejabberd_23.01_auf_ejabberd_23.04.txt · Zuletzt geändert: 23.04.2023, 09:31 von Christoph Stoltz