Make use of the open sourced wrapper

Make use of the open sourced wrapper

https://github.com/kohsuke/winsw/blob/master/doc/installation.md

Prepare Nifi windows server

  1. Make sure JDK 1.8 above is installed on the windows server and in the class path running the service. If not, change the bootstrap.properties to point to correct JDK.

At current stage, JRE is not tested

  1. Here’s an example of config nifi.xml ,put the file under nifi root folder,
1
2
3
4
5
6
7
8
9
10
<service>
<id>nifi</id>
<name>nifi</name>
<description>this service runs nifi solution</description>
<env name="APP_HOME" value="%BASE%"/>
<logpath>%BASE%\logs</logpath>
<logmode>rotate</logmode>
<executable>%BASE%/jre1.8.0_121/bin/java.exe</executable>
<arguments>-cp %BASE%\conf;%BASE%\lib\bootstrap\* -Xms12m -Xmx24m -Dorg.apache.nifi.bootstrap.config.log.dir=%BASE%\logs -Dorg.apache.nifi.bootstrap.config.pid.dir=%BASE%\run -Dorg.apache.nifi.bootstrap.config.file=%BASE%\conf\bootstrap.conf org.apache.nifi.bootstrap.RunNiFi Start</arguments>
</service>
  1. Put the winsw-2.1.0-bin.exe under the folder of nifi root folder, change the name to nifi.exe

  2. Use windows shell command line , run nifi.exe install to install the service

1
nifi.exe install
Reward Makes Perfect
0%