Skip to content

Building Apache Kafka

linuxonz edited this page Apr 10, 2025 · 66 revisions

Building Apache Kafka

General Notes:

  • When following the steps below please use a standard permission user unless otherwise specified.

  • A directory /<source_root>/ will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.

Starting with version 4.0.0, Apache Kafka binaries include native support for s390x and can be downloaded from here. To use these binaries, different Java flavors can be installed on mentioned distributions.

1. Install Dependencies

export SOURCE_ROOT=/<source_root>/

1.1. Install Basic Dependencies

  • RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
    sudo yum install -y tar gzip wget
  • SLES 15 SP6
    sudo zypper install -y tar gzip wget
  • Ubuntu (22.04, 24.04, 24.10)
    sudo apt-get update
    sudo apt-get -y install tar gzip wget

1.2. Install Java

  • With IBM Semeru Runtime (previously known as AdoptOpenJDK openj9).

    • Download and install IBM Semeru Runtime (Java 17 or 21) from here.
  • With Eclipse Adoptium Temurin Runtime (previously known as AdoptOpenJDK hotspot)

    • Download and install Eclipse Adoptium Temurin Runtime (Java 17 or 21) from here.
  • With OpenJDK 17

    • RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
      sudo yum install -y java-17-openjdk-devel
    • SLES 15 SP6
      sudo zypper install -y --auto-agree-with-licenses java-17-openjdk java-17-openjdk-devel
    • Ubuntu (22.04, 24.04, 24.10)
      sudo apt-get install -y openjdk-17-jdk
  • With OpenJDK 21

    • RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
      sudo yum install -y java-21-openjdk-devel
    • SLES 15 SP6
      sudo zypper install -y --auto-agree-with-licenses java-21-openjdk java-21-openjdk-devel
    • Ubuntu (22.04, 24.04, 24.10)
      sudo apt-get install -y openjdk-21-jdk

Note: Versions v17.0.14, v21.0.6 of IBM Semeru Runtime and v17.0.14, v21.0.6 of Adoptium Temurin Runtime were used at the time of creation of these instructions.

1.3. Set Environment Variables

export JAVA_HOME=<path to jdk dir>
export PATH=$JAVA_HOME/bin:$PATH

2. Install Apache Kafka

Extract the Apache Kafka binary tarball to $SOURCE_ROOT.

3. Verification (Optional)

Follow official quickstart guide to verify the installation.

References:

Clone this wiki locally