Installing and configuring JDK

Install Java Development Kit (JDK) 21 on every host where NiFi or NiFi Registry will run.

You can use one of the following JDK distributions:

  • Azul Zulu OpenJDK
  • OpenJDK
  • Oracle JDK

Cloudera recommends Azul Zulu OpenJDK.

Installing JDK 21 on RHEL8

  1. Install one of the supported JDK distributions.

    1. Configure the Azul RPM repository.
      sudo dnf install -y https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm
    2. Install Azul Zulu JDK 21.
      sudo dnf install zulu21-jdk
    1. Download the JDK 21 RPM package appropriate for your system from the Oracle Java downloads page.

    2. Install Oracle JDK 21.
      sudo dnf install ./jdk-21_linux-x64_bin.rpm
    1. Install OpenJDK 21.
      sudo dnf install java-21-openjdk-devel
  2. Verify that Java 21 is installed.

    java -version

Configuring JDK for NiFi and NiFi Registry

After installing JDK, follow these steps to configure it for NiFi and NiFi Registry.

  1. Configure JDK for NiFi.

    1. Open Cloudera Manager.
    2. Navigate to the NiFi service.
    3. Locate the nifi.jdk.home configuration property.
    4. Set the property to the absolute path of the JDK installation directory.

      For example: /usr/lib/jvm/zulu21-jdk

  2. Configure JDK for NiFi Registry.

    1. In Cloudera Manager, navigate to the NiFi Registry service.
    2. Locate the nifi.registry.jdk.home configuration property.
    3. Set the property to the absolute path of the JDK installation directory.
  3. Save your changes.

  4. Restart NiFi and NiFi Registry to apply the configuration.

After installing and configuring the JDK, install and configure a supported database for NiFi Registry.