Skip to content
Stefan Weil edited this page Dec 2, 2024 · 27 revisions

Welcome to the kitodo-production wiki!

Test installation

macOS (M1, M2, ...)

The pre-installed Java (OpenJDK 22.0.1 in /Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home) is too new for the current Kitodo.Production. OpenJDK 17 is available, too, and can be used with some modifications.

Install supported versions of MariaDB, Opensearch, OpenJDK and Tomcat with Homebrew:

brew install mariadb opensearch openjdk@17 tomcat@9

Start Tomcat (only for a single test):

export CATALINA_HOME=/opt/homebrew/opt/tomcat@9/libexec
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home
$CATALINA_HOME/bin/catalina.sh start

Or start Tomcat as a service which automatically starts at reboot:

export CATALINA_HOME=/opt/homebrew/Cellar/$(brew list --version tomcat@9|sed 's/ /\//')/libexec
echo JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home > $CATALINA_HOME/bin/setenv.sh
brew services start tomcat@9

Start Opensearch as a service which automatically starts at reboot:

brew services start opensearch

Start MariaDB as a service which automatically starts at reboot:

brew services start mariadb

Create a new Kitodo database:

mariadb -e 'DROP DATABASE IF EXISTS kitodo;'
mariadb -e 'CREATE DATABASE kitodo;'
mariadb -e "CREATE USER IF NOT EXISTS 'kitodo'@'localhost' IDENTIFIED BY 'kitodo';"
mariadb -e "GRANT ALL ON kitodo.* TO 'kitodo'@'localhost';"
mariadb kitodo < Kitodo/setup/schema.sql
mariadb kitodo < Kitodo/setup/default.sql
# Update the database (needed because the default setup is old).
mvn clean install -B '-Pflyway'

Optionally build Kitodo.Production:

cd
git clone https://github.com/kitodo/kitodo-production.git
cd ~/kitodo-production
mkdir -p config-local
cp Kitodo/src/main/resources/kitodo_config.properties config-local/
mvn install

Linux, Windows, Docker, Podman

The instructions for an installation on Linux also apply to the installation on Windows with the Windows Subsystem for Linux (WSL) and to the installation in a Docker or Podman container.

With Podman Desktop it is very easy to install and run an instance of Kitodo.Production. This is suggested for tests and development.

Debian bullseye

podman run --name kitodo -it docker.io/debian:bullseye-slim bash

Install OpenSearch following the official documentation.

export LANG=C.UTF-8

cd
apt update
apt install git maven openjdk-11-jdk-headless tomcat9
apt install gnupg imagemagick mysql-server sudo wget
git clone https://github.com/kitodo/kitodo-production.git

service mariadb start

cd ~/kitodo-production
mkdir -p config-local
cp Kitodo/src/main/resources/kitodo_config.properties config-local/
mvn clean install -B '-Pall-tests,flyway,checkstyle,!development'

Debian bookworm, trixie

Note: openjdk-11-jdk-headless is not available for Debian bookworm and trixie, but can be installed from Debian sid.

podman run --expose 8080 --name kitodo -it docker.io/debian:bookworm-slim bash

Install OpenSearch following the official documentation.

export LANG=C.UTF-8

cd
apt update
apt install -y git maven openjdk-17-jdk-headless
apt install -y gnupg imagemagick mariadb-server sudo wget
git clone https://github.com/kitodo/kitodo-production.git
cd ~/kitodo-production

service mariadb start
mkdir -p config-local
cp Kitodo/src/main/resources/kitodo_config.properties config-local/
ln -s database.yml.actions config/database.yml
cp Kitodo-DataManagement/src/main/resources/db/config/flyway.properties.actions Kitodo-DataManagement/src/main/resources/db/config/flyway.properties
mariadb -e 'CREATE DATABASE kitodo;'
mariadb -e "CREATE USER 'kitodo'@'localhost' IDENTIFIED BY 'kitodo';"
mariadb -e "GRANT ALL ON kitodo.* TO 'kitodo'@'localhost';"
mariadb kitodo < Kitodo/setup/schema.sql
mariadb kitodo < Kitodo/setup/default.sql

mvn clean install -B '-Pall-tests,flyway,checkstyle,!development'

cd /opt
# See https://tomcat.apache.org/tomcat-9.0-doc/RUNNING.txt.
wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.97/bin/apache-tomcat-9.0.97.tar.gz
tar xvzf apache-tomcat-9.0.97 apache-tomcat-9.0.97.tar.gz
ln -s apache-tomcat-9.0.97 tomcat@9
export CATALINA_HOME=$PWD/tomcat@9
export JRE_HOME=/usr/lib/jvm/java-17-openjdk-arm64
$CATALINA_HOME/bin/catalina.sh start

Useful Maven commands

mvn dependency:analyze
mvn dependency:tree
mvn dependency:tree -Dverbose
mvn versions:update-properties --no-snapshot-updates -DallowMajorUpdates=false -DallowMinorUpdates=false
mvn versions:use-latest-releases -DallowMajorUpdates=false -DallowMinorUpdates=false