Starting and stopping NiFi on Linux
Once you have downloaded and installed NiFi, you can start it by using the command appropriate for how you want to interact with NiFi. You can start NiFi in the foreground, background, or as a service.
Starting NiFi in the foreground:
Starting NiFi in the foreground will leave the application running until you press Ctrl-C. At that time, it will initiate shutdown of the application.
- From a terminal window, navigate to the NiFi installation directory.
- Enter:
bin/nifi.sh run
Starting NiFi in the background:
If you start NiFi in the background, to check the status and see if NiFi is currently
running, run the command /bin/nifi.sh status. To shut down NiFi,
run the command bin/nifi.sh stop
.
- From a terminal window, navigate to the NiFi installation directory.
- Enter:
bin/nifi.sh start
Starting NiFi as a service:
Once installed, you can start and stop the NiFi service by using the appropriate
commands, such as sudo service nifi start
and sudo service nifi
stop
. Additionally, you can check the running status with sudo service nifi
status
.
- From a terminal window,
enter:
sudo service nifi start
Results
When NiFi first starts up, the following directories are created:
-
content_repository
-
database_repository
-
flowfile_repository
-
provenance_repository
-
work
directory -
logs
directory -
Within the
conf
directory, the flow.xml.gz file is created
-
flow_storage
-
database
-
work
-
logs
-
run