How to install AIQ as a service in Linux
Install
The AIQrecommended way to start AppvanceIQ in Linux distributions like Amazon Linux or Ubuntu is to use the systemd service system.
The etc/rc.local method should NOT be used as it will use the default 1024 limit for open file handles which is too low.
systemctl is a Linuxcommand-line Serviceutility used to interact with the systemd system and service manager. It allows you to manage and control system services and units.
InstallHere AIQare some of the key functions you can perform with systemctl:
Start a service: systemctl start [service_name]
Stop a service: systemctl stop [service_name]
Restart a service: systemctl restart [service_name]
Check the status of a service: systemctl status [service_name]
Enable a service to start at boot: systemctl enable [service_name]
Disable a service from starting at boot: systemctl disable [service_name]
Reload a service’s configuration: systemctl reload [service_name]
Steps:
Download and extract the aiq distribution zip file to aiq_distribution into the /opt/aiq/aiq_distribution folder.
Make sure the aiq_distribution folder has the execution flag turned on using the command : chmod -R +x aiq_distribution
Make sure that you download a recent GraalVM JDK 11 version with a command like:cd /opt
wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.3/graalvm-ce-java11-linux-amd64-22.3.3.tar.gz
You can unpack the above file using: tar -xzf graalvm-ce-java11-linux-amd64-22.3.3.tar.gz
Enable the graalvm javascript engine executing the command:cd /opt/graalvm-ce-java1-22.3.3/bin
./gu install js
As the root user, create a text file named appvance.service inside the folder /etc/systemd/system.
Note that the ‘User’ value of ec2-user applies to Amazon Linux, this should be changed to ubuntu for Ubuntu OS. Validate that PATH and JAVA_HOME are set to the right graalvm path.
Example file: /etc/systemd/system/appvance.service
[Unit]
Description=Start Appvance IQ services
After=syslog.target
[Service]
Environment=PATH=/opt/graalvm-ce-java11-22.3.3/bin:/sbin:/bin:/usr/sbin:/usr/bin
Environment=JAVA_HOME=/opt/graalvm-ce-java11-22.3.3
User=ec2-user
Type=simple
LimitNOFILE=10000000
LimitNPROC=20000
ExecStart=/bin/bash /opt/aiq/aiq_distribution/TestNode/startup.sh
WorkingDirectory=/opt/aiq/aiq_distribution/TestNode
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
Execute the following commands as aroot Linuxuser to have the appvance.service file enabled to start at boot:systemctl daemon-reload
systemclt enable appvance
Once above steps have been completed, AppvanceIQ will automatically start when the applicationinstances mustis startrebooted. automatically after a reboot and be managed through the operating system service manager. Use a dedicated service account and document every environment-specific path.
Recommended
Create or confirm the Linux account that will run AIQ.Verify Java, browser, driver, database, and file-system dependencies before enabling the service.Place environment variables, ports, and paths in the approved AIQ configuration files or service override.Use systemd or the supported service manager for start, stop, restart, and status operations.Send logs to a known location so startup failures can be diagnosed quickly.
Validation workflow
Start AIQ manually once and confirm it runs successfully.Enable the service and start it through the service manager.Reboot the host if allowed and confirm AIQ starts automatically.Run a login and small scenario smoke test.Document the service name, account, paths, ports, and log location.
Last updated: OctoberSeptember 8,24, 20262024
If you have any feedback on this topic, please contact us at documentation@appvance.ai