Building Apache Kafka - linux-on-ibm-z/docs GitHub Wiki

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 3.2.0, Apache Kafka binaries include native support for s390x and can be downloaded from here. To use these binaries, Java needs to be installed on mentioned distributions.

Note:

  • At the time of creation of these build instructions, Apache Kafka 3.7.0 was verified with JDK 11 version (Temurin-11.0.19+7) and (IBM Semeru Runtime Certified Edition 11.0.19+7 (build 11.0.19+7)) and for JDK 17 version (Temurin-17.0.9+9) and (Semeru-17.0.8.1+1)

Step 1: Install Prerequisites

  • RHEL (7.8, 7.9, 8.6, 8.8, 8.9, 9.0, 9.2, 9.3)

      sudo yum install -y tar gzip
    
    • With OpenJDK 11
    sudo yum install -y git java-11-openjdk-devel
    
    • With OpenJDK 17 (Except RHEL 7.x)
    sudo yum install -y git java-17-openjdk-devel
    
    • With Eclipse Adoptium Temurin JDK (previously known as AdoptOpenJDK hotspot)

      • Download and install Eclipse Adoptium Temurin JDK (Java 11 or 17) from here.
    • With IBM Semeru JDK (previously known as AdoptOpenJDK openj9)

      • Download and Install IBM Semeru JDK (Java 11 or 17) from here.
  • SLES (12 SP5, 15 SP5)

      sudo zypper install -y tar gzip
    
    • With OpenJDK 11
      sudo zypper install -y java-11-openjdk java-11-openjdk-devel
      
    • With OpenJDK 17 (Except SLES 12 SP5)
    sudo zypper install -y java-17-openjdk java-17-openjdk-devel
    
    • With Eclipse Adoptium Temurin JDK (previously known as AdoptOpenJDK hotspot)

      • Download and install Eclipse Adoptium Temurin JDK (Java 11 or 17) from here.
    • With IBM Semeru JDK (previously known as AdoptOpenJDK openj9)

      • Download and Install IBM Semeru JDK (Java 11 or 17) from here.
  • Ubuntu (20.04, 22.04, 23.10)

      sudo apt-get update
      sudo apt-get -y install tar gzip
    
    • With OpenJDK 11

      sudo apt-get install -y openjdk-11-jdk
      
    • With OpenJDK 17

      sudo apt-get install -y openjdk-17-jdk
      
    • With Eclipse Adoptium Temurin JDK (previously known as AdoptOpenJDK hotspot)

      • Download and install Eclipse Adoptium Temurin JDK (Java 11 or 17) from here.
    • With IBM Semeru JDK (previously known as AdoptOpenJDK openj9)

      • Download and Install IBM Semeru JDK (Java 11 or 17) from here.

Step 2: Set Environment Variables

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

Verify that java is installed correctly by running

java -version

and verify the output is correct for the installed jdk.

Step 3: Install the Kafka Binaries

Extract the binary tar to /<source_root>/.

Step 4: Verification (Optional)

Follow official quickstart guide given here to verify the installation.

References: