Skip to content
Stefan Weil edited this page Oct 29, 2024 · 18 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/Cellar/tomcat@9/9.0.93/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

Podman

Debian bullseye

podman run --name kitodo -it docker.io/debian:bullseye-slim bash
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

podman run --expose 8080 --name kitodo -it docker.io/debian:bookworm-slim bash
export LANG=C.UTF-8

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

service mariadb start
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.90/bin/apache-tomcat-9.0.90.tar.gz
tar xvzf apache-tomcat-9.0.90.tar.gz
export CATALINA_HOME=$PWD/apache-tomcat-9.0.90
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