Installing the Licensing Service
For correct operation of applications using ABBYY FineReader Engine 12, the Licensing Service (LicensingService) is required.
The Licensing Service is installed automatically during the Developer and Runtime installation in automatic mode. If you use manual installation, follow the instructions below. After the installation of the Licensing Service is complete, run the License Manager Utility to manage licenses.
Note: The Licensing Service works with the systemd software suite by default and supports working with the SysVinit daemon. If you want to replace your SysVinit with the systemd, uninstall your old distributive with the uninstallfre.sh script and install the new distributive with the activatefre.sh script (see Installing the ABBYY FineReader Engine Library). If you want to uninstall the distributive with the systemd, while the distributive with the SysVinit is still installed, perform these commands:
$ systemctl disable abbyy-fre12-licensing-service $ systemctl stop abbyy-fre12-licensing-service $ rm -rf /usr/local/{bin,lib}/ABBYY/SDK/12/Licensing
Then uninstall the distributive with the uninstallfre.sh script.
The Licensing Service settings are provided in the LicensingSettings.xml file. This file is generated automatically during automatic installation. When installing manually, you will have to create this file in the Bin and CommonBin/Licensing folders and specify correct settings in it. The XML schema of the Licensing Service settings is described in the LicensingSettings.xsd file. You can find this file in the Inc folder. The detailed description of the settings is provided in the Working with the LicensingSettings.xml File section.
Notes:
- We recommend that you install (uninstall) the Licensing Service in manual mode only during Runtime installation (deinstallation). For development purposes use the standard installation and deinstallation.
- Use ABBYY FineReader Engine and Licensing Service from the same package. Otherwise, compatibility is not guaranteed.
Installing in manual mode
Important! Licensing Service should be installed under ROOT.
- Copy the files for the Licensing Service and the License Manager utility to the workstation: libAbbyyZlib.so, libFineFormats.so, libFineNet.so, libFineObj.so, libPortLayer.so, libProtection.so, libProtectionConsoleUI.so, LicensingSchema.xe, ProductLicensingSchema.xe, LicensingService, and LicenseManager.Console. Copy the resource files libProtectionRes*.so for the interface languages you need, and libProtectionResShared.so.
- Create a folder for storing the licensing data (/var/lib/ABBYY/SDK/12/Licenses folder by default). Everyone must have full access permissions on this folder.
- For Online License: Create or choose a folder in which your application searches for the license token file, and place the token file there. You may choose the /var/lib/ABBYY/SDK/12/Licenses folder, which is the default behavior, or another folder used for storing the licensing data. Everyone must have full access permissions on these folders.
- If necessary, specify parameters of the LocalLicenseServer in the LicensingSettings.xml file (see Working with the LicensingSettings.xml File).
- Run LicensingService:
- Create /var/run/abbyy-licensing-daemon/ folder with the read and write permissions for root user only.
- Run LicensingService with the following command line:
LicensingService /start
The environment variable LD_LIBRARY_PATH should be set to the path to the folder with the copied libraries.
To run the service each time you start the system, register it in your init system, e.g., as daemon.
If you are using systemd init system:
- Create abbyy-fre12-licensing-service.service configuration service file and place it to /etc/systemd/system/ folder. File permissions should be 664 (read & write for owner (which is root) & user group, read for others). The file example:
[Unit] Description=abbyy-fre12-licensing-service: Provides managements of ABBYY SDK 12 Licensing Service After=network.target [Service] Type=forking Environment="LD_LIBRARY_PATH=/usr/local/lib/ABBYY/SDK/12/Licensing" ExecStartPre=/bin/mkdir -p /var/run/abbyy-licensing-daemon ExecStart=/usr/local/bin/ABBYY/SDK/12/LicensingService /start ExecStop=/usr/local/bin/ABBYY/SDK/12/LicensingService /stop ExecReload=/usr/local/bin/ABBYY/SDK/12/LicensingService /stop ExecReload=/usr/local/bin/ABBYY/SDK/12/LicensingService /start [Install] WantedBy=multi-user.target
- Update the services list:
$ systemctl daemon-reload
- Enable loading service on system startup.
$ systemctl enable abbyy-fre12-licensing-service
- Run LicensingService.
$ systemctl start abbyy-fre12-licensing-service
If you are using SysVinit or Upstart init system:
- Create abbyy-fre12-licensing-service.sh configuration service file and place it to /etc/init.d/ folder. File permissions should be 755 (read, write, execute for owner (which is root), read & execute for user group and others). The file example:
#! /bin/sh ### BEGIN INIT INFO # Provides: abbyy-fre12-licensing-service # Required-Start: $all # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start ABBYY SDK 12 Licensing Service # Description: Provides managements of ABBYY SDK 12 Licensing Service ### END INIT INFO export LD_LIBRARY_PATH=/usr/local/lib/ABBYY/SDK/12/Licensing:$LD_LIBRARY_PATH set -e case $1 in start) mkdir -p /var/run/abbyy-licensing-daemon /usr/local/bin/ABBYY/SDK/12/LicensingService /start ;; stop) /usr/local/bin/ABBYY/SDK/12/LicensingService /stop ;; restart|force-reload) $0 stop $0 start ;; status) /usr/local/bin/ABBYY/SDK/12/LicensingService --status=$0 ;; *) echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2 exit 1 ;; esac
- Enable loading service on system startup.
For SysVinit:
$ chkconfig --add abbyy-fre12-licensing-service
For Upstart:
update-rc.d abbyy-fre12-licensing-service defaults
- Run LicensingService.
$ service abbyy-fre12-licensing-service start
Note: SELinux may interfere with correct operation of the Licensing Service. If you are experiencing licensing errors, try the following command line with the actual path to LicensingService:
chcon -u system_u -t bin_t /path/to/LicensingService
- Install the Licensing Service on the license server:
- Copy the files for the Licensing Service and the License Manager utility to a computer, which will be used as a license server: libAbbyyZlib.so, libFineFormats.so, libFineNet.so, libFineObj.so, libPortLayer.so, libProtection.so, libProtectionConsoleUI.so, LicensingSchema.xe, ProductLicensingSchema.xe, LicensingService, and LicenseManager.Console. Copy the resource files libProtectionRes*.so for the interface languages you need, and libProtectionResShared.so.
- Create a folder for storing the licensing data (/var/lib/ABBYY/SDK/12/Licenses folder by default). Everyone must have full access permissions on this folder.
- Create a LicensingSettings.xml file for the license server.
- Specify in the LicensingSettings.xml file the settings according to the license type (see Working with the LicensingSettings.xml File for details):
- For Online License: OnlineLicensing tag if you want to use an Online License with a proxy server. In other cases of setting an Online License skip this step.
- Copy the configured LicensingSettings.xml file to the license server into the folder where the Licensing Service is installed.
- Configure the connection between the license server and workstations:
- For Online License: Create or choose on all workstations a folder in which your application searches for the license token file, and place the token file there. You may choose the /var/lib/ABBYY/SDK/12/Licenses folder, which is the default behavior, or another folder used for storing the licensing data. Everyone must have full access permissions on these folders.
- Create the LicensingSettings.xml file for the workstations.
- Specify in the LicensingSettings.xml file the settings according to the license type (see Working with the LicensingSettings.xml File for details):
- The ServerAddress and ProtocolType attributes of the MainNetworkLicenseServer tag.
- Copy the configured LicensingSettings.xml file to all workstations into the /opt/ABBYY/FREngine12/Bin/ folder where the License Manager is installed.
- Run LicensingService as described in step 5 of Standalone installation.
If you would like to run the Licensing Service as a non-root user, run it manually each time you start the operating system:
- Create start_licensing_service.sh file and place it to the <FRE_installation_directory>/CommonBin/Licensing folder. The file example:
#!/bin/bash export LD_LIBRARY_PATH=<FRE_installation_directory>/CommonBin/Licensing pgrep LicensingServic || exec <FRE_installation_directory>/CommonBin/Licensing/LicensingService /standalone
- Start the Licensing Service via the command:
as a daemon
run "<FRE_installation_directory>/Bin/ServiceWrapper <FRE_installation_directory>/CommonBin/Licensing/start_licensing_service.sh"
as an application
run "<FRE_installation_directory>/CommonBin/Licensing/LicensingService /standalone"
See also
Distribution of Applications Using the ABBYY FineReader Engine Library
7/3/2024 8:50:25 AM