The following instructions provide a recommended approach for setting up InterformNG2 on Linux. This setup has been tested on Ubuntu v22 and is also compatible with other distributions like Red Hat Linux 8, provided the headless version is not used.
Install Java Runtime v17 (if not already installed) - not the headless variant.
sudo apt install openjdk-17-jresudo useradd -m ifng
sudo passwd ifngsudo usermod -aG
sudo ifngsudo -u ifng -s
cd ~ Alternatively, log in as an existing user.
sudo mkdir /opt/InterFormNG2_Linux
sudo chown ifng /opt/InterFormNG2_Linux/unzip InterFormNG2_Linux.zip
-d /opt/InterFormNG2_LinuxWithin the folder, move the keystore to the correct location:
cd /opt/InterFormNG2_Linux
mkdir keystore
mv interformng2.p12 keystore/mkdir /opt/InterFormNG2_Linux/libextEdit the file /opt/InterFormNG2_Linux/application-default.properties and add this line:
interformng2.privateKey=<RANDOM-STRING>
chmod -R 500 /opt/InterFormNG2_Linux/[Unit] Description=InterFormNG2 After=syslog.target [Service] User=ifng Environment="INTERFORMNG2_HOME=/home/ifng/NG2Home" WorkingDirectory=/opt/InterFormNG2_Linux ExecStart=/bin/java -Xms512M -Xmx4096M \ -Djava.locale.providers=COMPAT,CLDR \ -Djava.io.tmpdir=/home/ifng/NG2Home/temp \ -cp /opt/InterFormNG2_Linux/InterformNG2-3.5.0.jar:libext/* \ org.springframework.boot.loader.JarLauncher SuccessExitStatus=143 [Install] WantedBy=multi-user.target
sudo systemctl enable iformng2
sudo service iformng2 startsudo journalctl --unit=iformng2In the example, the maximum memory allocation for InterformNG2 is set to 4GB using -Xmx4096M. This value can be adjusted as required.
To upgrade the Linux installation to a newer version of InterformNG2, without touching any configuration changes made to application-default.properties or keystores, follow this procedure (this assumes that the recommended installation procedure was previously followed):
Log in as the user running the application (typically user ifng).
Download the latest version of InterformNG2:
wget http://download.interform400.com/shares/SW/InterFormNG2_Linux.zipUnzip to a temporary folder:
unzip InterFormNG2_Linux.zip -d temp/sudo service iformng2 stopchmod -R 700 /opt/InterFormNG2_Linux/ rm /opt/InterFormNG2_Linux/InterformNG2-x.y.z.jar(replace x.y.z with the OLD InterformNG2 version)
rm -r /opt/InterFormNG2_Linux/modulescp temp/InterformNG2-X.Y.Z.jar /opt/InterFormNG2_Linux/cp -r temp/modules /opt/InterFormNG2_Linux/chmod -R 500 /opt/InterFormNG2_Linux/Edit the existing /etc/systemd/system/iformng2.service (with sudo) and change the version number on InterformNG2-x.y.z.jar to the new version number.
sudo systemctl daemon-reload
sudo service iformng2 startOn the Linux setup above you can change the recommended iformng2.service description above to include temp directory with the highlighted/bold text below:
ExecStart=/bin/java -Xms256M -Xmx4096M \ -Djava.io.tmpdir=/home/ifng/NG2Home/temp \ -jar /opt/InterFormNG2_Linux/InterformNG2-1.5.1.jar