要使使用 ABBYY FineReader Engine 12 的应用程序正常运行,必须安装许可服务。
在自动模式下执行开发者安装和运行时安装时,许可服务会自动安装。如果您使用手动安装,请按照以下说明操作。许可服务安装完成后,运行 License Manager 实用程序 来管理许可证。
许可服务默认使用 systemd 软件套件,同时也支持使用 SysVinit 守护进程。如果您想将 SysVinit 替换为 systemd,请使用 uninstallfre.sh 脚本卸载旧发行包,并使用 activatefre.sh 脚本安装新发行包 (请参见 安装 ABBYY FineReader Engine Library) 。如果您想卸载基于 systemd 的发行包,而基于 SysVinit 的发行包仍已安装,请执行以下命令:
$ systemctl disable abbyy-fre12-licensing-service
$ systemctl stop abbyy-fre12-licensing-service
$ rm -rf /usr/local/{bin,lib}/ABBYY/SDK/12/Licensing
然后使用 uninstallfre.sh 脚本卸载该安装包。
许可服务的设置位于 LicensingSettings.xml 文件中。此文件会在自动安装过程中自动生成。手动安装时,您需要在 Bin 和 CommonBin/Licensing 文件夹中创建此文件,并在其中指定正确的设置。许可服务设置的 XML 架构定义见 LicensingSettings.xsd 文件。您可以在 Inc 文件夹中找到该文件。有关这些设置的详细说明,请参阅 Working with the LicensingSettings.xml File 章节。
- 我们建议仅在运行时安装 (卸载) 时,以手动模式安装 (卸载) 许可服务。出于开发目的,请使用标准安装和卸载方式。
- 请使用同一软件包中的 ABBYY FineReader Engine 和许可服务。否则,无法保证兼容性。
对于独立安装:
- 将许可服务和 License Manager 实用程序的文件复制到工作站。Linux:libAbbyyZlib.so、libFineFormats.so、libFineNet.so、libFineObj.so、libPortLayer.so、libProtection.so、libProtectionConsoleUI.so、LicensingSchema.xe、ProductLicensingSchema.xe、LicensingService 和 LicenseManager.Console。复制所需界面语言的资源文件 libProtectionRes*.so,以及 libProtectionResShared.so
Windows:AbbyyZlib.dll、Awl.dll、concrt140.dll、FineFormats.dll、FineNet.dll、FineObj.dll、LicenseManager.exe、LicenseManager12.chm、LicensingSchema.xe、msvcp140.dll、ProductLicensingSchema.xe、Protection.dll、ProtectionRes0.dll、ProtectionResShared.dll、ProtectionUI.dll、vccorlib140.dll、vcruntime140.dll..
-
创建一个用于存储许可数据的文件夹 (默认为 %ProgramData%\ABBYY\SDK\12\Licenses 文件夹) 。Everyone 组必须对该文件夹具有完全访问权限。
-
对于在线许可证:创建或选择一个供应用程序搜索许可证令牌文件的文件夹,并将令牌文件放在其中。您可以选择默认使用的 %ProgramData%\ABBYY\SDK\12\Licenses 文件夹,或另一个用于存储许可数据的文件夹。Everyone 组必须对这些文件夹具有完全访问权限。
-
如有必要,请在 LicensingSettings.xml 文件中指定 LocalLicenseServer 的参数 (请参见使用 LicensingSettings.xml 文件) 。
-
运行 LicensingService:
-
创建 /var/run/abbyy-licensing-daemon/ 文件夹,并且仅 root 用户具有读写权限。
-
使用以下命令行运行 LicensingService:
环境变量 LD_LIBRARY_PATH 应设置为指向存放已复制库文件的文件夹路径。
要让该服务在每次系统启动时都运行,请将其注册到 init 系统中,例如注册为守护进程。
如果您使用的是 systemd init 系统:
- 创建名为 abbyy-fre12-licensing-service.service 的服务配置文件,并将其放置到 /etc/systemd/system/ 文件夹中。文件权限应为 664 (所有者 (即 root) 和用户组具有读写权限,其他用户具有只读权限) 。文件示例:
[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
- 更新服务列表:
$ systemctl daemon-reload
- 启用服务,使其在系统启动时自动加载。
$ systemctl enable abbyy-fre12-licensing-service
- 启动 LicensingService。
$ systemctl start abbyy-fre12-licensing-service
如果您使用的是 SysVinit 或 Upstart init 系统:
- 创建
abbyy-fre12-licensing-service.sh 服务配置文件,并将其放置到 /etc/init.d/ 文件夹中。文件权限应设为 755 (所有者 (即 root) 具有读、写、执行权限,用户组和其他用户具有读和执行权限) 。文件示例如下:
#! /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: 启动 ABBYY SDK 12 许可服务
# Description: 用于管理 ABBYY SDK 12 许可服务
### 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
- 启用系统启动时加载该服务。
对于 SysVinit:
$ chkconfig --add abbyy-fre12-licensing-service
对于使用 Upstart 的系统:
update-rc.d abbyy-fre12-licensing-service defaults
- 运行 LicensingService。
$ service abbyy-fre12-licensing-service start
SELinux 可能会影响许可服务的正常运行。如果出现许可相关错误,请尝试运行以下命令行,并将其中的路径替换为 LicensingService 的实际路径:
chcon -u system_u -t bin_t /path/to/LicensingService
对于网络安装:
- 在许可证服务器上安装许可服务:
- 将许可服务和 License Manager 实用程序的文件复制到一台将用作许可证服务器的计算机上Linux:libAbbyyZlib.so、libFineFormats.so、libFineNet.so、libFineObj.so、libPortLayer.so、libProtection.so、libProtectionConsoleUI.so、LicensingSchema.xe、ProductLicensingSchema.xe、LicensingService 和 LicenseManager.Console。复制所需界面语言的资源文件 libProtectionRes*.so,以及 libProtectionResShared.so
Windows:AbbyyZlib.dll、Awl.dll、concrt140.dll、FineFormats.dll、FineNet.dll、FineObj.dll、LicenseManager.exe、LicenseManager12.chm、LicensingSchema.xe、msvcp140.dll、ProductLicensingSchema.xe、Protection.dll、ProtectionRes0.dll、ProtectionResShared.dll、ProtectionUI.dll、vccorlib140.dll、vcruntime140.dll..
-
创建一个用于存储许可数据的文件夹 (默认位于 %ProgramData%\ABBYY\SDK\12\Licenses 文件夹) 。Everyone 组都必须对该文件夹具有完全访问权限。
-
为许可证服务器创建 LicensingSettings.xml 文件。
-
根据许可证类型,在 LicensingSettings.xml 文件中指定相应设置 (详见使用 LicensingSettings.xml 文件) :
- 对于在线许可证:如果要通过代理服务器使用在线许可证,请使用 OnlineLicensing 标签。其他在线许可证设置情况下,请跳过此步骤。
-
将配置好的 LicensingSettings.xml 文件复制到许可证服务器上安装许可服务的文件夹中。
-
配置许可证服务器与工作站之间的连接:
- 对于在线许可证:在所有工作站上创建或选择一个文件夹,供应用程序搜索许可证令牌文件,并将令牌文件放入该文件夹。您可以使用 %ProgramData%\ABBYY\SDK\12\Licenses 文件夹 (默认位置) ,也可以使用其他用于存储许可数据的文件夹。Everyone 组都必须对这些文件夹具有完全访问权限。
- 为工作站创建 LicensingSettings.xml 文件。
- 根据许可证类型,在 LicensingSettings.xml 文件中指定相应设置 (详见使用 LicensingSettings.xml 文件) :
- MainNetworkLicenseServer 标签的 ServerAddress 和 ProtocolType 属性。
- 将配置好的 LicensingSettings.xml 文件复制到所有工作站上安装 License Manager 的 /opt/ABBYY/FREngine12/Bin/ 文件夹中。
- 按照独立安装中步骤 5 的说明运行 LicensingService。
如果您希望以非 root 用户身份运行许可服务,请在每次启动操作系统时手动运行:
- 创建 start_licensing_service.sh 文件,并将其放到 <FRE_installation_directory>/CommonBin/Licensing 文件夹中。文件示例:
#!/bin/bash
export LD_LIBRARY_PATH=<FRE_installation_directory>/CommonBin/Licensing
pgrep LicensingServic || exec <FRE_installation_directory>/CommonBin/Licensing/LicensingService /standalone
- 使用以下命令启动许可服务:
以守护进程方式
run "<FRE_installation_directory>/Bin/ServiceWrapper <FRE_installation_directory>/CommonBin/Licensing/start_licensing_service.sh"
以应用程序形式
run "LD_LIBRARY_PATH=<FRE_installation_directory>/CommonBin/Licensing <FRE_installation_directory>/CommonBin/Licensing/LicensingService /standalone"
激活
Linux 分发
使用 LicensingSettings.xml 文件