Skip to main content

Install AIQ as a Linux Service

Install AIQ as a Linux Service

TheInstall recommendedAIQ wayas toa Linux service when the application must start AppvanceIQautomatically inafter Linuxa distributionsreboot likeand Amazonbe Linuxmanaged or Ubuntu is to usethrough 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 command-line utility used to interact with the systemdoperating system and service manager. ItUse allowsa youdedicated service account and document every environment-specific path.

  • 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 managea known location so startup failures can be diagnosed quickly.

Validation workflow

  1. Start AIQ manually once and controlconfirm systemit servicesruns and units.

    Here are some of the key functions you can perform with systemctl:

      successfully.
    • 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 graalvmservice javascriptand enginestart executingit through the command:
      cdservice /opt/graalvm-ce-java1-22.3.3/bin
      ./gu install js

      manager.

      AsReboot the roothost user,if createallowed and confirm AIQ starts automatically.

      Run a textlogin fileand namedsmall appvance.servicescenario insidesmoke test.Document the folderservice /etc/systemd/system.name,
      Noteaccount, thatpaths, the ‘User’ value of ec2-user applies to Amazon Linux, this should be changed to ubuntu for Ubuntu OS. Validate that PATHports, and JAVA_HOMElog 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
      location.

      Execute the following commands as root user 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 instances is rebooted.


      Last updated: SeptemberOctober 24,8, 20242026

      If you have any feedback on this topic, please contact us at documentation@appvance.ai