Installing Apache Nifi on Ubuntu!

Henrique Silveira
tecnologia no Grupo Boticário
2 min readMay 17, 2021

Para leitura em português (ou outro idioma), recomendamos a tradução do conteúdo conforme estes links: para Google Chrome; para Mozilla Firefox; para Microsoft Edge.

Tela de computador escrito “ubuntu” em linhas de código
Tela de computador escrito “ubuntu” em linhas de código | Foto de Gabriel Heinzer na Unsplash

Would you like to learn how to do an Apache Nifi installation on Ubuntu Linux? In this tutorial, we are going to show you how to download and install Apache Nifi on a computer running Ubuntu Linux.

  • Ubuntu 18.04
  • Ubuntu 19.04
  • Apache Nifi 1.13.2

Tutorial Apache Nifi — Installation on Ubuntu Linux

Install the Java JDK package version 8.

apt-get update
apt-get install openjdk-8-jdk

Use the following command to find the Java JDK installation directory.

update-alternatives --config java

This command output should show you the Java installation directory

There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
Nothing to configure.

In our example, our Java JDK is installed under the folder: /usr/lib/jvm/java-8-openjdk-amd64

Now you need to create an environment variable named JAVA_HOME.

Let’s create a file to automate the required environment variables configuration

vi /etc/profile.d/java.sh

Here is the java.sh file content.

#/bin/bash
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

Reboot the computer.

reboot

Use the following command to verify if the JAVA_HOME variable was created.

env | grep JAVA_HOMEJAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

Use the following command to test the Java installation.

java -version

Here is the command output:

openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~19.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)

Download the Apache Nifi package.

mkdir /downloads/apache-nifi -p
cd /downloads/apache-nifi
wget https://downloads.apache.org/nifi/1.13.2/nifi-1.13.2-bin.tar.gz

Install the Apache Nifi server.

tar -zxvf nifi-1.13.2-bin.tar.gz
mv nifi-1.13.2 /opt/
ln -s /opt/nifi-1.13.2/ /opt/nifi
cd /opt/nifi
bin/nifi.sh install

Start the Apache Nifi service.

/etc/init.d/nifi start

Here is the command output:

Java home: /usr/lib/jvm/java-8-openjdk-amd64
NiFi home: /opt/nifi-1.13.2
Bootstrap Config File: /opt/nifi-1.13.2/conf/bootstrap.conf

Open a browser software, enter the IP address of your Apache Nifi server plus :8080/nifi

In our example, the following URL was entered in the Browser:

http://192.168.15.10:8080/nifi/

The Apache Nifi web interface should be presented.

Congratulations! You have finished the Apache Nifi installation on Ubuntu Linux.

--

--