NiFi Installation (Basic)

(Last Updated On: )

In this tutorial I will guide you through installing NiFi on Ubuntu 16.04 and setting to run as a service. We will assume you have a user called “hduser”.

Install Java 8

sudo apt-get install openjdk-8-jdk

Install NiFi

wget http://mirror.dsrg.utoronto.ca/apache/nifi/1.8.0/nifi-1.8.0-bin.tar.gz
tar -xzf nifi-1.8.0-bin.tar.gz
sudo mv nifi-1.8.0/ /usr/local/nifi

Set Ownership:

 sudo chown -R hduser:hduser /usr/local/nifi

Setup .bashrc:

 sudo nano ~/.bashrc

Add the following to the end of the file.

#NIFI VARIABLES START
export NIFI_HOME=/usr/local/nifi
export NIFI_CONF_DIR=/usr/local/nifi/conf
export PATH=$PATH:$NIFI_HOME/bin
#NIFI VARIABLES STOP

 source ~/.bashrc

Install NiFi As Service

cd /usr/local/nifi/bin
sudo ./nifi.sh install
reboot

Start/Stop/Status Service

sudo service nifi start
sudo service nifi stop
sudo service nifi status

Your site is now available http://localhost:8080/nifi

Uninstall

sudo rm /etc/rc2.d/S65nifi
sudo rm /etc/init.d/nifi
sudo rm /etc/rc2.d/K65nifi

sudo rm -R /usr/local/nifi/

One thought on “NiFi Installation (Basic)”

Comments are closed.