跳轉到主要內容
若要讓使用 ABBYY FineReader Engine 12 的應用程式正常運作,必須安裝 Licensing Service。 在自動模式下執行 Developer 和執行階段安裝時,系統會自動安裝 Licensing Service。若您採用手動安裝,請依照以下指示操作。Licensing Service 安裝完成後,請執行 授權管理工具程式 來管理授權。
Licensing Service 預設可搭配 systemd 軟體套件運作,也支援與 SysVinit 守護程序搭配使用。若您想以 systemd 取代 SysVinit,請使用 uninstallfre.sh 指令碼解除安裝舊版發行套件,並使用 activatefre.sh 指令碼安裝新版發行套件 (請參閱 安裝 ABBYY FineReader Engine 程式庫) 。如果您想在仍安裝 SysVinit 發行套件的情況下解除安裝 systemd 發行套件,請執行下列命令:
$ systemctl disable abbyy-fre12-licensing-service
$ systemctl stop abbyy-fre12-licensing-service
$ rm -rf /usr/local/{bin,lib}/ABBYY/SDK/12/Licensing
然後使用 uninstallfre.sh 指令碼解除安裝發行套件。 Licensing Service 的設定儲存在 LicensingSettings.xml 檔案中。此檔案會在自動安裝期間自動產生。手動安裝時,您必須在 BinCommonBin/Licensing 資料夾中建立此檔案,並在其中指定正確的設定。Licensing Service 設定的 XML 結構描述記載於 LicensingSettings.xsd 檔案中。您可以在 Inc 資料夾中找到此檔案。設定的詳細說明請參閱 Working with the LicensingSettings.xml File 一節。
  • 我們建議您僅在執行階段安裝 (解除安裝) 時,以手動模式安裝 (解除安裝) Licensing Service。若為開發用途,請使用標準安裝與解除安裝。
  • 請使用同一套件中的 ABBYY FineReader Engine 和 Licensing Service,否則不保證相容性。

以手動模式安裝

Licensing Service 應安裝在 ROOT 下。
若為獨立安裝:
  1. 將 Licensing Service 和授權管理工具程式的檔案複製到工作站。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..
  1. 建立用於儲存授權資料的資料夾 (預設為 %ProgramData%\ABBYY\SDK\12\Licenses 資料夾) 。所有人都必須對此資料夾具有完整存取權限。
  2. 若為線上授權:建立或選擇一個資料夾,讓您的應用程式在其中搜尋授權權杖檔案,並將該權杖檔案放在此資料夾中。您可以選擇 %ProgramData%\ABBYY\SDK\12\Licenses 資料夾 (此為預設行為) ,或其他用於儲存授權資料的資料夾。所有人都必須對這些資料夾具有完整存取權限。
  3. 如有需要,請在 LicensingSettings.xml 檔案中指定 LocalLicenseServer 的參數 (請參閱 Working with the LicensingSettings.xml File) 。
  4. 執行 LicensingService:
  5. 建立 /var/run/abbyy-licensing-daemon/ 資料夾,並且僅 root 使用者具有其讀寫權限。
  6. 使用以下命令列執行 LicensingService:
LicensingService /start
環境變數 LD_LIBRARY_PATH 應設為已複製程式庫所在資料夾的路徑。 若要在每次系統啟動時都執行此服務,請將其註冊到 init 系統中,例如註冊為守護程序。 如果您使用的是 systemd init 系統:
  1. 建立 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
  1. 更新服務清單:
$ systemctl daemon-reload
  1. 啟用系統啟動時自動載入服務。
$ systemctl enable abbyy-fre12-licensing-service
  1. 啟動 LicensingService。
$ systemctl start abbyy-fre12-licensing-service
如果您使用的是 SysVinit 或 Upstart init 系統:
  1. 建立 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 Licensing Service
# Description:       提供 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 "用法:$0 {start|stop|restart|force-reload|status}" >&2
    exit 1
    ;;
esac
  1. 啟用服務在系統啟動時自動載入。
對於 SysVinit:
$ chkconfig --add abbyy-fre12-licensing-service
若使用 Upstart:
update-rc.d abbyy-fre12-licensing-service defaults
  1. 啟動 LicensingService。
$ service abbyy-fre12-licensing-service start
SELinux 可能會干擾 Licensing Service 的正常運作。如果您遇到授權錯誤,請嘗試執行下列命令,並將其中的路徑替換為 LicensingService 的實際路徑:
chcon -u system_u -t bin_t /path/to/LicensingService
對於網路安裝:
  1. 在授權伺服器上安裝 Licensing Service:
    1. 將 Licensing Service 和授權管理工具程式的檔案複製到將作為授權伺服器使用的電腦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..
  1. 建立一個用於儲存授權資料的資料夾 (預設為 %ProgramData%\ABBYY\SDK\12\Licenses 資料夾) 。所有人都必須擁有此資料夾的完整存取權限。
  2. 為授權伺服器建立 LicensingSettings.xml 檔案。
  3. 在 LicensingSettings.xml 檔案中根據授權類型指定設定 (詳情請參閱 Working with the LicensingSettings.xml File) :
    • 對於線上授權:如果您想透過代理伺服器使用線上授權,請使用 OnlineLicensing 標籤。若為其他線上授權設定情況,請略過此步驟。
  4. 將設定好的 LicensingSettings.xml 檔案複製到授權伺服器上安裝 Licensing Service 的資料夾中。
  5. 設定授權伺服器與工作站之間的連線:
    1. 對於線上授權:在所有工作站上建立或選擇一個資料夾,供您的應用程式搜尋授權權杖檔案,並將該權杖檔案放在其中。您可以選擇 %ProgramData%\ABBYY\SDK\12\Licenses 資料夾 (這是預設行為) ,或其他用於儲存授權資料的資料夾。所有人都必須擁有這些資料夾的完整存取權限。
    2. 為工作站建立 LicensingSettings.xml 檔案。
    3. 在 LicensingSettings.xml 檔案中根據授權類型指定設定 (詳情請參閱 Working with the LicensingSettings.xml File) :
      • MainNetworkLicenseServer 標籤的 ServerAddress 和 ProtocolType 屬性。
    4. 將設定好的 LicensingSettings.xml 檔案複製到所有工作站上安裝授權管理員的 /opt/ABBYY/FREngine12/Bin/ 資料夾中。
    5. 依照獨立安裝中 步驟 5 的說明執行 LicensingService。
如果您想以非 root 使用者身分執行 Licensing Service,請在每次啟動作業系統時手動執行它:
  1. 建立 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
  1. 使用以下命令啟動 Licensing Service:
以守護程序方式
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 Working with the LicensingSettings.xml File