Installing InterFormNG2 on Linux

Installing InterFormNG2 on Linux


The following instructions provide a recommended approach for setting up InterFormNG2 on Linux. This setup has been tested on Ubuntu v20 and is also compatible with other distributions like Red Hat Linux 8, provided the headless version is not used.


Run as a service with systemd (HTTPS version)

 

Install Java Runtime v8 (if not already installed)

On Ubuntu, install the Java Runtime using the following command:
sudo apt install openjdk-8-jre

For Optimal Security (Optional)
It is recommended, though not required, to create a dedicated user specifically for running InterFormNG. 
To create a new user, run the following commands:
sudo useradd -m ifng 
sudo passwd ifng

Enter the password when prompted:
sudo usermod -aG 
sudo ifng

Switch to the newly created user:
sudo -u ifng -s
cd ~ 

Alternatively, log in as an existing user.


Download the Application zip file:
Use the following command to download the application:

 

Unzip the File to an Appropriate Folder (in this example, /opt/InterFormNG2_Linux is used):
sudo mkdir /opt/InterFormNG2_Linux
sudo chown ifng /opt/InterFormNG2_Linux/

unzip InterFormNG2_Linux.zip

-d /opt/InterFormNG2_Linux

 

Within the folder, move the keystore to the correct location:

 cd /opt/InterFormNG2_Linux
 mkdir keystore
 mv interformng2.p12 keystore/


Create a Folder for additional JAR files. If you require a database driver, it can be placed in this folder.
This folder serves as a replacement for the jre/lib/ext folder in Java 8.
mkdir /opt/InterFormNG2_Linux/libext

 

Edit the file /opt/InterFormNG2_Linux/application-default.properties and add this line:

interformng2.privateKey=<RANDOM-STRING>


Where <RANDOM-STRING> is indicated, enter your own randomly generated string with a minimum of 32 characters. This string will be used as an encryption key, so it’s important to choose a long, unique value for each installation.
Notes
Note: You can set this value as an environment variable instead of in application-default.properties. However, using a dot (.) in the variable name may lead to potential issues.
Make sure that only the user running the application has read access to the files
chmod -R 500 /opt/InterFormNG2_Linux/


Create a new file named /etc/systemd/system/iformng2.service with the following content (If you’re using a text editor, make sure to run it with sudo since this location requires root access):
[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


Finally set it to start up automatically after a system restart, and then start the service:
sudo systemctl enable iformng2
sudo service iformng2 start

In case of startup problems, view the console log:
sudo journalctl --unit=iformng2


Additional consideration

It’s important to consider which users need access to the INTERFORMNG2_HOME directory, and set file permissions accordingly to ensure optimal security.
In the example provided, the ifng user's home directory is used for the InterFormNG home folder (/home/ifng/NG2Home). However, this may not be ideal if other users need access to the folder via the file system.

In the example, the maximum memory allocation for InterFormNG2 is set to 4GB using -Xmx4096M. This value can be adjusted as required.

The startup parameters include -Djava.locale.providers=COMPAT,CLDR. This setting ensures that date format strings generated by InterFormNG2, such as those from the ng:dateTimeFormat() XPath function, remain consistent with the format used in previous Java 8 versions. While this setting is recommended, it is optional.


Upgrading an existing installation

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:

Use the following command to download the application:
wget http://download.interform400.com/shares/SW/InterFormNG2_Linux.zip


Unzip to a temporary folder:

unzip InterFormNG2_Linux.zip -d temp/


Stop the running service:
sudo service iformng2 stop


Make the installation folder writable:
chmod -R 700 /opt/InterFormNG2_Linux/ 


Delete old files (only these files, do not remove other files in the folder):
rm /opt/InterFormNG2_Linux/InterformNG2-x.y.z.jar

(replace x.y.z with the OLD InterFormNG2 version)

rm -r /opt/InterFormNG2_Linux/modules


Copy the new files from the temporary folder:
cp temp/InterformNG2-X.Y.Z.jar /opt/InterFormNG2_Linux/

(replace X.Y.Z with the NEW InterFormNG2 version)
cp -r temp/modules /opt/InterFormNG2_Linux/


Make the files read-only again:
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.

Start the service again:
sudo systemctl daemon-reload
sudo service iformng2 start

Setup of temporary work files on the Linux platform

On 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


    Notice: Help Center Transition Update

    As of January 13, 2025, we are excited to announce that our new Help Center is in the final stages of development. While the Knowledge Base is already accessible, our current JIRA system will continue to manage support tickets during this transition period. For assistance with InterForm Output Management Software, please refer to the Support for InterForm Output Management Software.

    We appreciate your patience and understanding as we work to enhance your support experience. If you have any questions or encounter any issues, please do not hesitate to reach out via the existing support channels.

    Best regards,
    The InterForm Support Team


      • Related Articles

      • Installing InterFormNG2 on IBM i

        Installing InterformNG2 on IBM i: Installation of InterFormNG2 on the IBM i platform is described below. Please notice the prerequisites - especially for OS400 and Java. You can also view this video: Please refer to Spool2XML for details regarding ...
      • Installing InterFormNG2 on Windows

        Installing InterformNG2 on Windows: A video, that covers the installation on the Windows platform is included below: In order to install, you first need to unzip the distribution file, and then run the unzipped installation file. Now you will see ...
      • Installing the preview client

        As an aid to the designer you can choose to install a preview client. The preview client works together with the designer and constantly merge the current template with the selected sample file in the designer. The preview client can e.g. be used, if ...
      • Installation and upgrade

        The procedure to install and upgrade depends on which platform, that you want to install InterFormNG2: Installing InterFormNG2 on IBM i Installing InterFormNG2 on Linux Installing InterFormNG2 on Windows Connecting to AS400 from another platform ...
      • HTTPS enabling

        During installation you were asked to select the access protocol for the application as either HTTP or HTTPS. If you selected HTTPS then all communication between the browser and the application will be encrypted. Using HTTPS is recommended when ...