Skip to content

Installation Kitodo.Presentation

Stefan Weil edited this page Feb 3, 2024 · 22 revisions

Installationsanleitungen

  1. Grundinstallation und Systemvoraussetzungen
  2. Installation der Erweiterungen: (eine Option wählen)
    2a. Installation Kitodo.Presentation
    2b. Installation Kitodo.Presentation mit DFG Viewer als Beispielanwendung
    2c. Installation Kitodo.Presentation mit DFG Viewer und OCR-On-Demand als Beispielanwendung

Installation Kitodo.Presentation

Installation Kitodo.Presentation

Im Folgenden wird die Installation der TYPO3-Extension Kitodo.Presentation (dlf) gezeigt.

cd /var/www/dfgviewer
composer config platform.php 7.4

Für PHP 8.2 muss statt dessen composer config platform.php 8.2 aufgerufen werden.

composer require kitodo/presentation
vendor/bin/typo3 extensionmanager:extension:install dlf

Für PHP 8.2 muss momentan statt dessen composer require --ignore-platform-req=php kitodo/presentation:^5.0.0-rc1 aufgerufen werden. Die Installation von dlf funktioniert damit nicht!

Damit wird die neuste Version von Kitodo.Presentation installiert.

Will man eine andere Version installieren muss man den Composeraufruf entsprechend anpassen. Hier am Beispiel für Presentation 3.3.x:

composer require kitodo/presentation:^3.3

Konfiguration

...

vendor/bin/typo3cms configuration:set SYS/systemLocale en_US.UTF-8
vendor/bin/typo3cms configuration:set SYS/fileCreateMask 0660
vendor/bin/typo3cms configuration:set SYS/folderCreateMask 2770

...

Installation solr

solr wird für die Volltextsuche benötigt.

Die neueste Version wird so installiert (Stand 2022-10-08):

cd /opt
wget https://downloads.apache.org/lucene/solr/8.11.2/solr-8.11.2.tgz
tar xzf solr-8.11.2.tgz
solr-8.11.2/bin/install_solr_service.sh solr-8.11.2.tgz
Protokoll der Installation:
id: ‘solr’: no such user
Creating new user: solr
Adding system user `solr' (UID 113) ...
Adding new group `solr' (GID 122) ...
Adding new user `solr' (UID 113) with group `solr' ...
Creating home directory `/var/solr' ...

Extracting solr-8.11.2.tgz to /opt

Installing symlink /opt/solr -> /opt/solr-8.11.2 ...

Installing /etc/init.d/solr script ...

Installing /etc/default/solr.in.sh ...

Service solr installed.
Customize Solr startup configuration in /etc/default/solr.in.sh
● solr.service - LSB: Controls Apache Solr as a Service
     Loaded: loaded (/etc/init.d/solr; generated)
     Active: active (exited) since Sat 2022-10-08 21:13:24 CEST; 5s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 146069 ExecStart=/etc/init.d/solr start (code=exited, status=0/SUCCESS)
        CPU: 8ms

Oct 08 21:13:21 ocr-02 systemd[1]: Starting LSB: Controls Apache Solr as a Service...
Oct 08 21:13:21 ocr-02 su[146071]: (to solr) root on none
Oct 08 21:13:21 ocr-02 su[146071]: pam_unix(su-l:session): session opened for user solr(uid=113) by (uid=0)
Oct 08 21:13:23 ocr-02 solr[146145]: Started Solr server on port 8983 (pid=146141). Happy searching!
Oct 08 21:13:24 ocr-02 systemd[1]: Started LSB: Controls Apache Solr as a Service.

Anschließend sind noch Konfigurationsdateien und ein Plugin von Kitodo.Presentation ins Verzeichnis von solr zu kopieren:

cd /opt
cp -av /var/www/typo3/public/typo3conf/ext/dlf/Configuration/ApacheSolr/configsets/dlf /opt/solr/server/solr/configsets/
mkdir -p /opt/solr/contrib/ocrsearch/lib
apt install lsof

Für presentation > 4:

cp -av /var/www/typo3/public/typo3conf/ext/dlf/Build/Test/solr/contrib/ocrsearch/lib/solr-ocrhighlighting-*.jar /opt/solr/contrib/ocrsearch/lib/

Für presentation < 4:
Plugin unter: https://github.com/dbmdz/solr-ocrhighlighting/releases

wget https://github.com/dbmdz/solr-ocrhighlighting/releases/download/wip/solr-ocrhighlighting-0.8.4-SNAPSHOT.jar  -P /opt/solr/contrib/ocrsearch/lib/

Siehe:

Anweisungen:

Im solr Verzeichnis:
bin/solr stop -all
bin/solr start -force
bin/solr create -c <core> -force
bin/solr create -c <core> -d </path/to/config/>

  • -c: name
  • -d: confdir
  • -n: configName
  • -shards
  • -replicationFactor
  • -p: port
  • -V

bin/post -c <core> <path/to/xml>

Im TYPO3 Verzeichnis:
./vendor/bin/typo3 kitodo:index -d <http://URL/to/XML> -p <ConfigFolderUID> -s <core>
zB.: ./vendor/bin/typo3 kitodo:index -d http://localhost/fileadmin/fulltextfolder/URN/nbn/de/bsz/180/digosi/30/tesseract-basic/log59088.xml -p 3 -s dlf
zB.: ./vendor/bin/typo3 kitodo:index -d https://digi.bib.uni-mannheim.de/fileadmin/digi/445662204/445662204.xml -p 3 -s dlf

Wobei die wichtigesten Parameter folgende sind:

  • -d|--doc: Die UID eines existierenden Dokumentes oder die URL zu einer METS XML
  • -p|--pid: Die Seiten-UID des Datenordners von Kitodo.Presentation
  • -s|--solr: Der Index (UID) oder die Bezeichnung des Solr Cores

Mehr: https://docs.typo3.org/p/kitodo/presentation/3.3/en-us/User/Index.html

Presentation: Core

  1. Admin Tools -> Settings -> Extension Configuration -> dlf -> Solr:
    • Einstellungen prüfen und ggf. anpassen:
      • solr.solrHost: IP Adresse der Solr installation
      • und weitere
    • Extension Configuration neu öffnen
      • Bei erfolgreicher Verbindung zu Solr wird die Meldung Connection established! angezeigt:
        -> grafik
      • (keine Aussage über die Cores/Collections)
  2. Admin Tools -> New Tenant -> Kitodo Condiguration:
    • Alles was gelb hinterlegt ist aktivieren
      -> grafik
  3. Web -> List -> Kitodo Condiguration -> Sorl Cores: Core auswählen, im Feld Solr Core die Bezeichnung des Cores von oben übernehmen und speichern
    • Blaue Box mit Infos über den Core und die ggfs. indizierten Dokumente wird angezeigt
      -> grafik

...

Presentation: Seiten

Im folgenden müssen drei neue Seiten angelegt werden: Seitenansicht, Suchergebnis und Suche

  1. Seitenansicht:
    • Besitzt ein Contentemelent: Pageview aus der Kategorie Kitodo Plugins
      • Einstellungen:
        • Plugin -> Startingpoint: Muss der Kitodo Configuration Ordner ausgewählt werden
        • Rest optional
  2. Suchergebnisse:
    • Besitzt ein Contentemelent: List View aus der Kategorie Kitodo Plugins
      • Einstellungen:
        • Plugin -> Startingpoint: Muss der Kitodo Configuration Ordner ausgewählt werden
        • Plugin -> Target page: Muss die Seite mit dem Pageview Element ausgewählt werden (hier: Seitenansicht)
        • Rest optional
  3. Suche:
    • Besitzt ein Contentemelent: Search aus der Kategorie Kitodo Plugins
      • Einstellungen:
        • Plugin -> Startingpoint: Muss der Kitodo Configuration Ordner ausgewählt werden
        • Plugin -> Target page: Muss die Seite mit dem List View Element ausgewählt werden (hier: Suchergebnisse)
        • Plugin -> Enable fulltext search: Aktivieren
        • Plugin -> Number of search slots: Mehr als 1
        • Plugin -> Solr Core: Auf den eingerichteten Core setzen
        • Rest optional

...