Hi Russell,

To set that variable up as a system environment variable requires the installer 
to do something, like add the export command to a file such as 
“/etc/environment”. That is what we do on our current project, and I can see it 
happening in an Ansible task.

An out of the box installation will not create a system environment variable. 
Instead, it is created for the NiFi session by having nifi.sh call nifi-env.sh. 
Nifi.sh assumes that nifi-env.sh will be located in the same directory it is 
located in. This is of course circular, so at some point you need a systemd 
service or init script to be told where nifi.sh is located. Handily, if you run 
“nifi.sh install” this will install an init script in /etc/init.d for you that 
includes the location of the NiFi home and bin directories.

TL,DR; when you install NiFi, at some point you need to run “nifi.sh install” 
which will ensure a definition of NIFI_HOME exists within the context of the 
NiFi session. A system wide definition of NIFI_HOME is down to the installer 
themselves.

Regards

Steve Hindmarch

From: Russell Bateman <[email protected]>
Sent: Friday, June 7, 2024 10:46 PM
To: NiFi Users List <[email protected]>
Subject: Who or what sets up NIFI_HOME as a system environment variable?

It's hard for me to determine this for customers who may already have installed 
Apache NiFi and just drop my NAR in or count on my Docker container. I'd like a 
clearer idea of who or what is responsible for that.

Reply via email to