How to Configure Helical Insight as a Systemd Service After Manual Installation on Linux

Hello Team,

After manually installing Helical Insight version 6.1 on a Linux server, how can we configure it to run as a system service?

We would like Helical Insight to start automatically whenever the server is rebooted and also be able to manage the application using standard service commands such as start, stop, restart, and status.

What are the steps to manually configure Helical Insight as a systemd service?

Thank You,
Snow.

Hello Snow,

After completing the manual installation of Helical Insight, you can configure it as a systemd service so that the application can be managed through the Linux service manager and automatically starts after a server reboot.

The following steps explain how to configure Helical Insight as a systemd service on Linux distributions that use systemd (such as RHEL 8/9, Ubuntu, and CentOS).

Note: Stop the Helical Insight/Tomcat process before proceeding. Execute the following steps using the root user or with appropriate sudo privileges.

1. Verify the Tomcat installation

Navigate to your Helical Insight installation directory and verify that the Tomcat installation and startup scripts are available.

For example:

ls -ld /path/to/HelicalInsight/hi/apache-tomcat-11

ls -l /path/to/HelicalInsight/hi/apache-tomcat-11/bin/catalina.sh

Ensure that the Tomcat scripts have executable permissions:

chmod +x /path/to/HelicalInsight/hi/apache-tomcat-11/bin/.sh*

Note: Replace /path/to/HelicalInsight/hi/apache-tomcat-11 with your actual Tomcat installation path.

2. Create the systemd service file

Create a service file using the following command:

vi /etc/systemd/system/HelicalInsight.service

Add the following configuration:

[Unit]

Description=Helical Insight

Wants=network-online.target

After=network-online.target

[Service]

Type=simple

WorkingDirectory=/path/to/HelicalInsight/hi/apache-tomcat-11

Environment=“CATALINA_HOME=/path/to/HelicalInsight/hi/apache-tomcat-11”

Environment=“CATALINA_BASE=/path/to/HelicalInsight/hi/apache-tomcat-11”

ExecStart=/path/to/HelicalInsight/hi/apache-tomcat-11/bin/catalina.sh run

ExecStop=/path/to/HelicalInsight/hi/apache-tomcat-11/bin/catalina.sh stop

Restart=on-failure

RestartSec=10

TimeoutStartSec=180

TimeoutStopSec=60

SuccessExitStatus=143

[Install]

WantedBy=multi-user.target

Replace the example paths with your actual Helical Insight and Tomcat installation paths.

Save and exit the file.

Note: Ensure that the service runs under an appropriate Linux user with the required permissions to access the installation directory, configuration files, logs, and other resources. If a dedicated service user is used, configure the User and Group properties accordingly.

3. Reload the systemd configuration

After creating the service file, reload systemd to recognize the newly created service.

systemctl daemon-reload

4. Start Helical Insight

Start the service using:

systemctl start HelicalInsight

Check the service status:

systemctl status HelicalInsight

The expected status is:

Active: active (running)

5. Enable automatic startup after server reboot

To configure Helical Insight to start automatically whenever the server reboots, execute:

systemctl enable HelicalInsight

Verify whether the service is enabled:

systemctl is-enabled HelicalInsight

Expected output:

enabled

6. Manage Helical Insight using service commands

Once the systemd service is configured, you can manage Helical Insight using the following commands:

Operation Command
Start systemctl start HelicalInsight
Stop systemctl stop HelicalInsight
Restart systemctl restart HelicalInsight
Check status systemctl status HelicalInsight
Enable auto-start systemctl enable HelicalInsight
Disable auto-start systemctl disable HelicalInsight
Check auto-start status systemctl is-enabled HelicalInsight

7. Verify automatic startup

To confirm that the service starts automatically after a server reboot, execute:

reboot

After the server restarts, verify the service status:

systemctl status HelicalInsight

The service should be running automatically if the configuration is correct.

Thank You,
Helical Insight