Confluence

Vorbereitungen

Es muss ein Postgresql-Server ab Version 14 mit folgender Datenbank installiert sein:

  • Database-Name: confluence

  • Database-User: confluence-app

Siehe auch

Sicherstellen, dass im Confluence Data Verzeichnis (default: /opt/atlassian/confluence) genug Platz ist. Durch die Verwendung von Bildern und Anhängen kann das Wiki schnell sehr gross werden. Daher sollte das entsprechende Volume nicht kleiner als 100GB sein.

Installation

Das Installations-Binary kann von https://www.atlassian.com/software/confluence/download-archives heruntergeladen werden.

Datei ausführbar machen:

chmod +x ./atlassian-confluence-8.2.1-x64.bin

Installer ausführen:

./atlassian-confluence-8.2.1-x64.bin
Installing fontconfig and fonts
Last metadata expiration check: 3:44:47 ago on Thu 11 May 2023 12:11:44 PM CEST.

emacs-filesystem.noarch                                                                                              1:26.1-7.el8_7.1                                                                                                 baseos
python3-psycopg2.x86_64                                                                                              2.9.5-3.rhel8                                                                                                    pgdg-common
Obsoleting Packages
libpq5.x86_64                                                                                                        15.1-42PGDG.rhel8                                                                                                pgdg-common
    libpq.x86_64                                                                                                     13.5-1.el8                                                                                                       @appstream
libpq5.x86_64                                                                                                        15.2-42.1PGDG.rhel8                                                                                              pgdg-common
    libpq.x86_64                                                                                                     13.5-1.el8                                                                                                       @appstream
Last metadata expiration check: 3:44:48 ago on Thu 11 May 2023 12:11:44 PM CEST.
Package fontconfig-2.13.1-4.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Last metadata expiration check: 3:44:49 ago on Thu 11 May 2023 12:11:44 PM CEST.
Package dejavu-sans-fonts-2.35-7.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Last metadata expiration check: 3:44:50 ago on Thu 11 May 2023 12:11:44 PM CEST.
No match for argument: google-noto-cjk-fonts
Error: Unable to find a match: google-noto-cjk-fonts
Last metadata expiration check: 3:44:51 ago on Thu 11 May 2023 12:11:44 PM CEST.
No match for argument: google-noto-sans-cjk-fonts
Error: Unable to find a match: google-noto-sans-cjk-fonts
Last metadata expiration check: 3:44:52 ago on Thu 11 May 2023 12:11:44 PM CEST.
No match for argument: google-noto-serif-cjk-fonts
Error: Unable to find a match: google-noto-serif-cjk-fonts
Regenerating the font cache
Fonts and fontconfig have been installed
Unpacking JRE ...
Starting Installer ...

This will install Confluence 8.2.1 on your computer.
OK [o, Enter], Cancel [c]

Click Next to continue, or Cancel to exit Setup.

Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (uses default settings) [1],
Custom Install (recommended for advanced users) [2, Enter],
Upgrade an existing Confluence installation [3]


Select the folder where you would like Confluence 8.2.1 to be installed,
then click Next.
Where should Confluence 8.2.1 be installed?
[/opt/atlassian/confluence]


Default location for Confluence data
[/var/atlassian/application-data/confluence]


Configure which ports Confluence will use.
Confluence requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you will access
Confluence through your browser. The Control port is used to Startup and
Shutdown Confluence.
Use default ports (HTTP: 8090, Control: 8000) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]


Confluence can be run in the background.
You may choose to run Confluence as a service, which means it will start
automatically whenever the computer restarts.
Install Confluence as Service?
Yes [y, Enter], No [n] n


Extracting files ...


Please wait a few moments while we configure Confluence.

Installation of Confluence 8.2.1 is complete
Start Confluence now?
Yes [y, Enter], No [n]


Please wait a few moments while Confluence starts up.
Launching Confluence ...

Installation of Confluence 8.2.1 is complete
Your installation of Confluence 8.2.1 is now ready and can be accessed via
your browser.
Confluence 8.2.1 can be accessed at http://localhost:8090
Finishing installation ...

Der Installer fragt während der Installation, ob Confluence automatisch starten soll:

Confluence can be run in the background.
You may choose to run Confluence as a service, which means it will start
automatically whenever the computer restarts.
Install Confluence as Service?

Ablehnen - ein Systemd-Dienst wird später manuell erstellt.

Mit dem Browser http://example.com:8090 aufrufen und fertig einrichten:

  • Trial-Lizenz beziehen

  • non-clustered

  • Database type: PostgreSQL

  • Setup type: Simple

  • Hostname: localhost

  • Port: 5432

  • Database name: confluence

  • Username: confluence-app

Falls vorhanden, Lizenz unter http://example.com:8090/admin/license.action hinzufügen.

Bemerkung

Wenn Confluence einmal läuft, erstellt es standardmässig jede Nacht um 02:00 Uhr ein Backup in Form einer ZIP-Datei unter /var/atlassian/application-data/confluence/backups. Möchte man Backups löschen, die z.B. älter als 10 Tage sind, funktioniert dies auf Basis von Logrotating nicht, da die Dateinamen der Backup-ZIPs einen Zeitstempel enthalten. Ein geeigneter Cronjob wäre:

00 01 * * * cd /var/atlassian/application-data/confluence/backups; find -name '*zip' -ctime +10 -exec rm {} \;

Reverse Proxy

Confluence muss vom Reverse Proxy wissen, daher im Tomcat den entsprechenden Connector aktivieren: (https://confluence.atlassian.com/confkb/after-upgrading-confluence-you-are-unable-to-create-new-pages-or-spaces-785457379.html)

/opt/atlassian/confluence/conf/server.xml
<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
   maxThreads="200" minSpareThreads="10"
   enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
   protocol="org.apache.coyote.http11.Http11NioProtocol"
   proxyName="wiki.linuxfabrik.ch" proxyPort="443" scheme="https" />
setsebool -P httpd_can_network_connect on

Upgrade

Achtung

Confluence 8.5.x ist die letzte Version, die mit der „Server“-Lizenz betrieben werden kann.

Bei einem Upgrade ist das Vorgehen ähnlich wie bei einer Erstinstallation.

Die möglichen Upgrade-Pfade findet man unter https://confluence.atlassian.com/display/DOC/Upgrading+Confluence (oben rechts die entsprechende Confluence-Version auswählen).

Die aktuelle Version von Confluence findet man unter https://wiki.example.com/admin/systeminfo.action oder unten in der Fusszeile der Seite.

https://wiki.example.com/plugins/servlet/troubleshooting/pre-upgrade/

Vor Beginn des Upgrades muss die Datenbank gesichert werden. Backups von /var/atlassian/application-data/confluence und /opt/atlassian/confluence werden vom Upgrader erstellt. Ausserdem wird empfohlen, vor dem Upgrade einige Configs zu kopieren:

cp /opt/atlassian/confluence/conf/server.xml /tmp/server.xml-pre-upgrade
cp /opt/atlassian/confluence/confluence/WEB-INF/classes/confluence-init.properties /tmp/confluence-init.properties-pre-upgrade
cp /opt/atlassian/confluence/bin/setenv.sh /tmp/setenv.sh-pre-upgrade

Nun kann man Downtimes festlegen und mit dem Upgrade beginnen:

systemctl stop confluence
ver=8.5.3
chmod +x atlassian-confluence-$ver-x64.bin
./atlassian-confluence-$ver-x64.bin
Installing fontconfig and fonts
Last metadata expiration check: 2:24:50 ago on Fri 03 Nov 2023 02:23:53 PM CET.
Last metadata expiration check: 2:24:51 ago on Fri 03 Nov 2023 02:23:53 PM CET.
Package fontconfig-2.13.1-4.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Last metadata expiration check: 2:24:52 ago on Fri 03 Nov 2023 02:23:53 PM CET.
Package dejavu-sans-fonts-2.35-7.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Last metadata expiration check: 2:24:54 ago on Fri 03 Nov 2023 02:23:53 PM CET.
No match for argument: google-noto-cjk-fonts
Error: Unable to find a match: google-noto-cjk-fonts
Last metadata expiration check: 2:24:55 ago on Fri 03 Nov 2023 02:23:53 PM CET.
No match for argument: google-noto-sans-cjk-fonts
Error: Unable to find a match: google-noto-sans-cjk-fonts
Last metadata expiration check: 2:24:56 ago on Fri 03 Nov 2023 02:23:53 PM CET.
No match for argument: google-noto-serif-cjk-fonts
Error: Unable to find a match: google-noto-serif-cjk-fonts
Regenerating the font cache
Fonts and fontconfig have been installed
Unpacking JRE ...
Starting Installer ...

This will install Confluence 8.5.3 on your computer.
OK [o, Enter], Cancel [c]
o
Click Next to continue, or Cancel to exit Setup.

Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (uses default settings) [1],
Custom Install (recommended for advanced users) [2],
Upgrade an existing Confluence installation [3, Enter]
3
Existing installation directory:
[/opt/atlassian/confluence]


The upgrade process will automatically back up your Confluence Installation
Directory. You can also choose to back up your existing Confluence Home
Directory. Both directories are backed up as zip archive files in their
respective parent directory locations.

We strongly recommend choosing this option in the unlikely event that you
experience problems with the upgrade and may require these backups to
restore your existing Confluence installation.

If you have many attachments in your Confluence Home Directory, the zip
archive of this directory may consume a significant amount of disk space.
Back up Confluence home ?
Yes [y, Enter], No [n]
y

Checking for local modifications.
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.

List of modifications made within Confluence directories.

The following provides a list of file modifications within the confluence
directory.

Modified files:
        conf/server.xml
Removed files:
        (none)
Added files:
        confluence/WEB-INF/classes/log4j-diagnostic.properties

[Enter]


Checking if your instance of Confluence is running

Back up your external database
We strongly recommend you back up your Confluence database if you have not
already done so.

Please refer to the following URL for back up guidelines:
https://docs.atlassian.com/confluence/docs-85/Production+Backup+Strategy

Check app compatibility
Check that your non-bundled apps are compatible with Confluence 8.5.3.

For more information see our documentation at the following URL:
https://docs.atlassian.com/confluence/docs-85/Installing+and+Configuring+Plugins+using+the+Universal+Plugin+Manager


Please ensure you have read the above checklist before upgrading.
Your existing Confluence installation is about to be upgraded! Do you want to proceed?
Upgrade [u, Enter], Exit [e]
u

Your instance of Confluence is currently being upgraded.
Checking if Confluence has been shutdown...
Backing up the Confluence installation directory

Backing up the Confluence home directory

Deleting the previous Confluence installation directory...

Extracting files ...


Please wait a few moments while we configure Confluence.

Start Confluence now?
Yes [y, Enter], No [n]
n
systemctl start confluence
tail -f /opt/atlassian/confluence/logs/catalina.out

Jetzt müssen die Apps über das Webinterface aktualisiert werden, danach kann das Wiki getestet werden.

Migration

Einen Export sämtlicher Daten auf dem ursprünglichen Confluence erstellen:

  • Gear-Icon oben rechts > General configuration

  • In der Sidebar Backup & Restore

  • Export this site

    • Checkbox Include attachments und Also save a copy to the Backups directory

    • Export

    • Exportierte Datei kann unter /var/atlassian/application-data/confluence/temp/xmlexport-20230530-225905-1.zip gefunden werden

  • Datei auf Zielrechner in den Pfad /var/atlassian/application-data/confluence/restore/ bewegen

Auf dem neuen Confluence den Import starten:

  • Zahnrad oben rechts > General configuration

  • In der Sidebar Backup & Restore

  • Import from the home directory

Built on 2024-04-18