...
The information on this page refers to License Statistics v6.17 or newer, which changed the License Statistics installation procedure for Linux. If you are running a previous version of License Statistics, see documentation for previous versions. |
If your Linux platform distribution is other than DEB or RPM Debian, Ubuntu, or RedHat Enterprise Linux (which have dedicated installers), License Statistics can be installed on most other Linux platforms using a universal , or you need more control over the installation process, you can use the generic (universal) installer.
This installation method requires more manual configuration than the DEB and RPM installers, but allows for a high level of customization including:
- 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 platforms distributions than officially supported DEB and RPM
Installation
The following generic Linux installation procedure can be customized according to your needs.
Note |
---|
All paths and commands used in the descriptions below are just examples of a customized installation procedure. This installation procedure requires advanced experience with customized installation, and all customizations are made at your own risk. |
- Download the License Statistics installation from the License Statistics download page.
Create user and group.
Code Block addgroup --system licstat adduser --ingroup licstat --no-create-home --system --disabled-login --shell /bin/false licstat
Create installation and data directories.
Note Back up all configuration and data files, especially the configuration file, MySQL data, and the license file.
Installation directoryCode 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
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
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/
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
Set options in the MySQL configuration file /opt/xflicstat/embedded/etc/mysql/mysql.conf:
Code Block user = licstat basedir # if installation is different then /opt/xflicstat: datadir # if mysql data dir is different then /var/opt/xflicstat/mysql:
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
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
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}
Reload systemd:
Code Block systemctl --system daemon-reload
and optionally enable License Statistics to start with system:
Code Block systemctl enable xflicstat.service
...
Code Block |
---|
systemctl stop xflicstat.service |
Anchor | ||||
---|---|---|---|---|
|
- Stop the service.
- Remove the directories with or without data directories, according to your needs.
...