Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The information on this page refers to License Statistics v6.17 18 or newer, which changed introduced the CLI and moved the License Statistics installation procedure for Linuxlicense from a file to the database. If you are running a previous version of License Statistics, see documentation for previous versions.

If your Linux distribution is other than Debian, Ubuntu, or RedHat Enterprise Linux (which have dedicated installers), or you need more control over the installation process, you can use the generic (universal) installer.

...

  • Running the application with a custom user
  • Optionally running the application in non-service mode
  • Customizing locations for files in the filesystem
  • Running the application on more distributions other than officially supported DEB and RPM

...

  1. Download the License Statistics installation from the License Statistics download page.
  2. Create user and group.

    Code Block
    addgroup --system licstat
    adduser --ingroup licstat --no-create-home --system --disabled-login --shell /bin/false licstat

  3. Create installation and data directories.

    Note

    Back up all configuration and data files, especially the configuration file , and MySQL data, and the license file.


    Installation directory

    Code Block
    mkdir -p /opt/xflicstat


    Data directories
    For MySQL:

    Code Block
    mkdir -p /var/opt/xflicstat/mysql

    For license file:

    Code Block
    mkdir -p /var/opt/xflicstat/license

    For logs:

    Code Block
    mkdir -p /var/opt/xflicstat/log


    For temporary and runtime files:

    Code Block
     mkdir -p /var/opt/xflicstat/tmp


  4. Set ownership and group:

    Code Block
    chown licstat:licstat /opt/xflicstat \ 
    	/var/opt/xflicstat/mysql \ 
    	/var/opt/xflicstat/license \ 
    	/var/opt/xflicstat/log \ 
    	/var/opt/xflicstat/tmp


  5. Extract License Statistics:

    Code Block
    tar xzf license_statistics_v6.17.0_linux_x64.tar.gz -C /opt/xflicstat

    and set ownership:

    Code Block
    chown -R licstat:licstat /opt/xflicstat/


  6. Set the port in the License Statistics configuration file /opt/xflicstat/conf/xflicstat.cfg:

    Code Block
    WEBSERVER_PORT = 8080
    	# if not run as root port must be greater than 1024


  7. Set options in the MySQL configuration file /opt/xflicstat/embedded/etc/mysql/mysql.conf:

    Code Block
    user = licstat 
    basedir
    	# if installation is different thenthan /opt/xflicstat:
    datadir
    	# if mysql data dir is different thenthan /var/opt/xflicstat/mysql:


  8. Bootstrap the database:

    Code Block
    LD_LIBRARY_PATH=/opt/xflicstat/embedded/lib /opt/xflicstat/embedded/bin/mysqld \
    				--defaults-file=/opt/xflicstat/embedded/etc/mysql/mysql.conf \ 
    				--initialize-insecure


  9. Copy the default file:

    Code Block
    cp /opt/xflicstat/scripts/default /etc/default/xflicstat

    and set in /etc/default/xflicstat:

    Code Block
    LOG_DIRECTORY=/var/opt/xflicstat/log 
    LICENSE_DIRECTORY=/var/opt/xflicstat/license 
    TMP_DIRECTORY=/var/opt/xflicstat/tmp


  10. Install systemd unit:

    Code Block
    cp /opt/xflicstat/scripts/xflicstat.service /lib/systemd/system/xflicstat.service

    and edit:

    Code Block
    systemctl edit xflicstat.service

    and set:

    Code Block
    [Service]
    User=licstat

    If installation directory is different than /opt/xflicstat, also set the new installation directory with:

    Code Block
    ExecStart=/opt/xflicstat/bin/xflicstat --run --logDir ${LOG_DIRECTORY} --licenseDir ${LICENSE_DIRECTORY} --tmpDir ${TMP_DIRECTORY}


  11. Reload systemd:

    Code Block
    systemctl --system daemon-reload
    
    

    and optionally, enable License Statistics to start with the system:

    Code Block
    systemctl enable xflicstat.service


...

Configure the installation using the configuration file:

{installation_directory}/conf/xflicstat.cfg.

For example:

/opt/xflicstat/conf/xflicstat.cfg

Activating the license

License files must be placed in {license_directory}.

For example:

/var/opt/xflicstat/license

...

Activate the license using:

/opt/xflicstat/bin/

...

xflicstat-cli license activate

...

activation_key

...

You may also use an alternative activation method, as described in https://docs.x-formation.com/display/LICSTAT/Activating + a +License+Statistics+ license.

Anchor
starting
starting
Starting the service

...

Anchor
removing
removing
Removing the service

  1. Stop the service (see Stopping the service, above).
  2. Remove the directories with or without data directories, according to your needs.

...

  1. Download the License Statistics installation from the License Statistics download page.
  2. Stop the service (see Stopping the service, above).
  3. Backup the xflicstat.cfg file; for example: /opt/xflicstat/conf/xflicstat.cfg
  4. Clear the current installation directory; for example: /opt/xflicstat
  5. Install the new version by extracting new files:

    Code Block
    tar xzf license_statistics_v6.17.0_linux_x64.tar.gz -C /opt/xflicstat

    and setting ownership:

    Code Block
    chown -R licstat:licstat /opt/xflicstat/


  6. Optionally, restore the configuration file or reconfigure the default configuration file.
  7. Start the service (see Starting the service, above).

...