本主题适用于 Linux 和 Windows 版 FRE。
LicensingSettings.xml 文件包含 ABBYY FineReader Engine 的保护设置。当您使用任意保护类型的网络许可证,或使用带在线保护的独立许可证时,许可服务 (必需) 都需要此文件。
在自动模式下安装 Developer 或 Runtime 时,系统会自动生成此文件。无论是网络安装还是独立安装,此文件都会生成在以下两个位置:
Linux:
安装文件夹中的 Bin 文件夹,以及
CommonBin/Licensing 文件夹
Windows:
%CommonProgramFiles(x86)%\ABBYY\SDK\12\Licensing\
<Installation Folder>\Bin64\ (如果有)
<Installation Folder>\Bin\ (如果有)
手动安装时,您需要创建此文件,并在其中指定正确的设置。在 Linux 中,请在上面列出的两个文件夹中都创建此文件。在 Windows 中,请在 Bin (Bin64) 文件夹中创建此文件。
许可服务 设置的 XML 架构在 LicensingSettings.xsd 文件中说明。您可以在 Inc 文件夹中找到此文件。
许可服务设置包括两个主要部分:
安装在当前计算机上的许可服务设置,在 <LocalLicenseServer> 标签中指定。
与安装了许可服务的网络服务器建立连接所需的参数。这些参数在 <LicensingServers><MainNetworkLicenseServer> 标签中指定。
如果 ABBYY FineReader Engine 安装在本地计算机上,则仅在需要时指定 <LocalLicenseServer> 中的设置即可。如果 ABBYY FineReader Engine 在网络环境中运行,则应在服务器上指定 <LocalLicenseServer> 参数,并在工作站上指定 <LicensingServers><MainNetworkLicenseServer> 参数。如果一台计算机同时作为服务器和工作站使用,则应同时指定 <LocalLicenseServer> 和 <LicensingServers><MainNetworkLicenseServer> 参数。有关详细信息,请参阅下面的标签说明。
在 Linux 中,ProtocolType 为 Sockets;在 Windows 中为 TCP/IP。
| 许可服务默认使用 3022 端口。如果安装许可服务的计算机上此端口已关闭,则许可服务将无法运行。在这种情况下,请在 <LocalLicenseServer> 或 <LicensingServers><MainNetworkLicenseServer> 标签的 EndPointName 属性中指定一个开放的端口,例如: <LocalLicenseServer> <ConnectionProtocol ProtocolType="TCP/IP" EndPointName="1025"/> </LocalLicenseServer> 或 <LicensingServers> <MainNetworkLicenseServer ServerAddress="computername" ProtocolType="TCP/IP" EndPointName="1025"/> </LicensingServers> |
如果您的计算机通过代理服务器连接到 Internet,且需要激活许可证,请在 <ProxyServer> 标签中指定连接参数。
支持的协议包括 SOCKS5 和 HTTP。对于 HTTP,可使用基本身份验证或不使用身份验证;对于 SOCKS,可使用用户名/密码身份验证或不使用身份验证。
以下是通过代理服务器激活时使用的示例文件:
<LocalLicenseServer>
<ConnectionProtocol ProtocolType="Sockets" />
</LocalLicenseServer>
<ProxyServer Server="protocol://server_name:port_number" Login="login" Password="password" />
在线许可证无需任何特殊设置,但如果要通过代理服务器连接,应在 <OnlineLicensing> 标签中指定代理服务器参数。
支持 HTTP 协议,并可使用 Anonymous、Basic 或 Digest 身份验证方案 。
以下是一个用于在线许可代理服务器设置的示例文件:
<LocalLicenseServer>
<OnlineLicensing Timeout="timeout_time" ProxyServer="http://server_name:port_number" ProxyAuth="login:password" />
<ConnectionProtocol ProtocolType="protocol_type" />
</LocalLicenseServer>
默认情况下,ABBYY FineReader Engine 会将许可相关的辅助信息存储在 %ProgramData%\ABBYY\SDK\12\Licenses 中。要设置其他文件夹,请在 <LicensesFolder> 标签中指定 Path 属性。对许可证数据文件夹的完全控制权限:
对于位于许可证服务器上的文件夹,为必需项
对于位于工作站上的文件夹,为可选项
示例中显示的 LicenseFolder 路径适用于 Windows。Linux 中对应的路径分别为 /home/user/workstation_logs_folder 和 /home/user/server_logs_folder。
| 对于工作站: <LicensingServers> ... </LicensingServers> <LicensesFolder Path="path_to_workstation_logs_folder"/> 对于许可证服务器: <LocalLicenseServer> ... </LocalLicenseServer> <LicensesFolder Path="path_to_server_logs_folder"/> |
对于通过网络分发的许可证,您可以设置双服务器配置,这样当其中一台服务器离线时,另一台服务器可作为备份服务器。为此,您需要一个启用了冗余支持的特殊类型 Network Runtime License。
在服务器上:
主服务器和备份服务器上必须激活相同的许可证。
每台服务器都必须在 <LocalLicenseServer><RedundancyNetworkLicenseServer> 标签中指定另一台服务器的地址。
在工作站上:
所有工作站都必须在 <LicensingServers><MainNetworkLicenseServer> 和 <LicensingServers><BackupNetworkLicenseServer> 标签中指定这两台服务器的地址。
使用许可证时,工作站会与主许可证服务器通信,并向其发送许可证参数和使用统计信息。主许可证服务器会定期将这些数据同步到备份服务器。如果主许可证服务器发生故障,备份服务器将接管许可证管理,并继续存储来自工作站的信息。
请注意,备份服务器会在经过一定的超时时间后停止提供许可证。该超时时间在许可证内部设置中指定,范围可为 4 到 5000 小时。要在主许可证服务器重新上线后重新连接,请使用 Engine 重新启动处理流程 (先取消初始化,再重新初始化) 。
如果备份许可证服务器发生故障,而主服务器正常运行,系统将继续工作,就像只有一台许可证服务器一样。备份服务器恢复后,会与主服务器重新同步,并再次作为备份服务器运行。
要在两台服务器上的许可证过期后更新许可证:
关闭其中一台服务器。
在可用的服务器上更新许可证。
关闭已更新许可证的服务器。
打开之前已关闭的服务器。
在可用的服务器上更新许可证。
通过打开两台服务器来恢复它们之间的连接。
在两台服务器上重启许可服务,以刷新许可证设置。
请参见下面的工作站和服务器冗余配置示例。
在 Windows 中,服务器与工作站之间的通信使用 TCP/IP 协议。
| 对于工作站: <LicensingServers> <MainNetworkLicenseServer ServerAddress="mainserver" ProtocolType="TCP/IP" EndPointName="1025"/> <BackupNetworkLicenseServer ServerAddress="backupserver" ProtocolType="TCP/IP" EndPointName="1025"/> </LicensingServers> 对于主许可证服务器: <LocalLicenseServer> <ConnectionProtocol ProtocolType="TCP/IP" EndPointName="1025"/> <RedundancyNetworkLicenseServer ServerAddress="backupserver" ProtocolType="TCP/IP" EndPointName="1025"/> </LocalLicenseServer> 对于备份许可证服务器: <LocalLicenseServer> <ConnectionProtocol ProtocolType="TCP/IP" EndPointName="1025"/> <RedundancyNetworkLicenseServer ServerAddress="mainserver" ProtocolType="TCP/IP" EndPointName="1025"/> </LocalLicenseServer> |
如果您需要使用此配置,请务必确认您的许可证支持该功能。详情请联系您的销售经理。
LicensingSettings
LicensingSettings。
元素:
LocalLicenseServer LicensingServers LicensesFolder ProxyServer (Linux Only ) 1
无
保护设置。
LocalLicenseServer
LocalLicenseServerSettings。
元素:
ConnectionProtocol EnableCodeMeterLicenses OnlineLicensing RedundancyNetworkLicenseServer 0…1
LicensingSettings
本机上许可服务的参数。
ConnectionProtocol
复杂类型。
属性:
ProtocolType — 协议类型。对于
Linux ,始终指定 Sockets 协议。对于
Windows :LocalInterprocessCommunication、
NamedPipes、TCP/IP 或 Sockets。在 Windows 中,这是本地许可服务的附加协议类型。独立安装无需指定此属性,因为独立许可证始终使用 LocalInterprocessCommunication 协议类型。
EndPointName — (可选) 端口号。默认值为
“3022”。0…1
LocalLicenseServer
连接协议的参数。
OnlineLicensing
复杂类型。
属性:
Timeout — (可选) 指定重新连接的时间间隔目前,通过代理服务器连接时唯一支持的协议为 HTTP,可为其指定以下属性:
ProxyServer — (可选) 代理服务器的地址及连接设置,格式为字符串 ”
protocol://server:port ”,各子字符串的含义如下:protocol — 连接代理服务器所用的协议。目前唯一支持的值为 HTTP。server — 代理服务器的名称或 IP 地址。port — 连接端口。ProxyAuth — (可选) 向代理服务器进行身份验证,格式为字符串 “login:password ”,各子字符串的含义如下:login — 授权用户名。password — 授权密码。0…1
LocalLicenseServer
指定计算机上是否可以使用在线许可证。
RedundancyNetwork LicenseServer
NetworkServerAddress。
属性:
ServerAddress — 冗余配置中另一台服务器的 DNS 名称或 IP 地址。ProtocolType — 协议类型。对于
Linux :始终指定 Sockets 协议。对于
Windows :LocalInterprocessCommunication、
NamedPipes、TCP/IP 或 Sockets。EndPointName — (可选) 端口号。默认值为
“3022”。0…1
LocalLicenseServer
为冗余双服务器配置中协同工作的每台网络许可证服务器指定与另一台服务器的连接及同步设置。
LicensingServers
复杂类型。
元素:
MainNetworkLicenseServer BackupNetworkLicenseServer 0…1
LicensingSettings
已安装许可服务的网络服务器列表。
MainNetworkLicense Server
NetworkServerAddress。
属性:
ServerAddress — 已安装许可服务的计算机的 DNS 名称或 IP 地址。ProtocolType — 协议类型。对于
Linux :始终指定 Sockets 协议。对于
Windows :LocalInterprocessCommunication、
NamedPipes、TCP/IP 或 Sockets。EndPointName — (可选) 端口号。默认值为
“3022”。1
LicensingServers
与安装了许可服务的主网络服务器的连接参数。
BackupNetwork LicenseServer
NetworkServerAddress.
Attributes:
ServerAddress — 安装了许可服务的计算机的 DNS 名称或 IP 地址。ProtocolType — 协议类型。对于
Linux ,请始终指定 Sockets 协议。对于
Windows :LocalInterprocessCommunication、
NamedPipes、TCP/IP 或 Sockets。EndPointName — (可选) 端口号。默认值为
“3022”。0…1
LicensingServers
与备份网络许可服务器的连接参数。
LicensesFolder
复杂类型。
属性:
Path - 包含许可信息的文件夹路径。
默认值为 “%ProgramData%\ABBYY\SDK\12\Licenses”。许可数据文件夹的完全控制权限: 位于许可服务器上的文件夹必须具备此权限 位于工作站上的文件夹此权限为可选 0…1
LicensingSettings
指定存储许可辅助信息的文件夹位置。
ProxyServer
ProxyServer。
属性:
Server — 代理服务器的地址和连接设置,格式为字符串 “protocol://server:port ”,
其中各子字符串的含义如下:protocol —
连接代理服务器所使用的协议:SOCKS5
或 HTTP。server — 代理服务器的名称或 IP 地址。port — 连接端口。Login — (可选) 授权用户名。Password — (可选) 授权密码。0…1
LicensingSettings
通过代理服务器进行 Internet 连接的设置,许可激活时需要此配置。
以下示例展示了一个适用于独立安装的简单 LicensingSettings.xml 文件。在 Windows 中,使用本地进程间通信。
<? xml version = "1.0" encoding = "utf-8" ?>
< LicensingSettings xmlns = "http://www.abbyy.com/Protection/LicensingSettings" >
< LocalLicenseServer >
< ConnectionProtocol ProtocolType = "LocalInterprocessCommunication" />
</ LocalLicenseServer >
</ LicensingSettings >
以下示例展示了用于网络安装的简单 LicensingSettings.xml 文件:一个用于工作站,另一个用于服务器。许可服务 位于名为 “computername” 的计算机上。在 Windows 中,服务器与工作站之间通过 TCP/IP 协议进行通信。
对于工作站:
<? xml version = "1.0" encoding = "utf-8" ?>
< LicensingSettings xmlns = "http://www.abbyy.com/Protection/LicensingSettings" >
< LicensingServers >
< MainNetworkLicenseServer ServerAddress = "computername" ProtocolType = "TCP/IP" />
</ LicensingServers >
</ LicensingSettings >
服务器端:
<? xml version = "1.0" encoding = "utf-8" ?>
< LicensingSettings xmlns = "http://www.abbyy.com/Protection/LicensingSettings" >
< LocalLicenseServer >
< ConnectionProtocol ProtocolType = "TCP/IP" />
</ LocalLicenseServer >
</ LicensingSettings >
分发
分发包
安装许可服务