Run Linaro Forge Licence Server

This section describes the process for setting up the Linaro Forge Licence Server and configuring it to start automatically during system boot.

Before you begin

  • For security reasons, ensure that Linaro Forge Licence Server runs as an unprivileged user. For example, nobody, or preferably a dedicated user. Furthermore, Linaro recommends restricting the visibility of the host running the Linaro Forge Licence Server only to trusted users, and hidden externally.

  • Linaro Forge Licence Server includes a systemd init configuration file for Linux systems.

  • If Linaro Forge Licence Server runs without arguments, it uses licenses in the current directory (files matching Licence* or the variant spelling License*). You can include an optional argument to specify an alternative directory location instead of the current directory.

  • Floating license server files are stored by default in the Linaro Forge Licence Server installation directory (/opt/linaro/licenceserver/<version>/licences). This is also the directory the systemd unit configuration uses by default.

Procedure

  1. To create an unprivileged user and allocate a log directory, run these commands as root.

    useradd --system --user-group --no-create-home \
         --home-dir /opt/linaro/licenceserver/<version> allinea
    mkdir /var/log/linaro
    chown allinea: /var/log/linaro
    

    This creates the user allinea and the log directory /var/log/linaro. The user is assigned ownership of the log directory. The /opt/linaro/licenceserver/<version> directory is the location of the Linaro Forge Licence Server installation. The license server log file is /var/log/linaro/allinea.log.

    Note

    If you install the Linaro Forge Licence Server in a custom installation path, set the FORGE_LICENSE_DIR environment variable to point to the custom license directory. ALLINEA_LICENSE_DIR is still supported and can be used instead of FORGE_LICENSE_DIR.

    Caution

    Ensure that the directory /var/log has appropriate access controls to limit access to the log files.

  2. Edit lib/systemd/system/allinea-licenceserver.service in your Linaro Forge Licence Server installation. Make sure that the Environment, ExecStart and User settings in the [Service] section are correct for your system.

  3. Create a symbolic link to the systemd directory:

    ln -s lib/systemd/system/allinea-licenceserver.service \
         /etc/systemd/system/
    
  4. Enable Linaro Forge Licence Server on future boots:

    systemctl enable allinea-licenceserver
    
  5. Start the Linaro Forge Licence Server:

    systemctl start allinea-licenceserver
    
  6. Check that the Linaro Forge Licence Server has started correctly:

    systemctl status allinea-licenceserver