Share Notes

chundev

View the Project on GitHub latteouka/share-notes

HCL BigFix 11 安裝手冊

日期:2026-06-29 適用版本: BigFix 11.0.6 (Patch 6, Build 137, 2026-04-06) 主要來源: HCL 官方安裝文件(每段附出處連結)


目錄

  1. 產品概述與架構
  2. 系統需求
  3. 網路與防火牆設定
  4. 安裝前準備
  5. BigFix Server 安裝(Windows + MSSQL)
  6. BigFix Server 安裝(Linux + MSSQL)
  7. BigFix Server 安裝(Linux + DB2)
  8. BigFix Relay 安裝
  9. BigFix Client 安裝
  10. 憑證與安全設定
  11. 安裝後驗證
  12. 部署架構規劃
  13. 常見問題與疑難排解
  14. 參考資料

1. 產品概述與架構

出處: Basic deployment

HCL BigFix(舊稱 IBM BigFix / Tivoli Endpoint Manager)是企業級端點管理平台,用於軟體部署、安全修補、合規檢查與資產管理。

三層式架構

                    ┌──────────────┐
                    │  HCL Fixlet  │  (Internet)
                    │   Servers    │
                    └──────┬───────┘
                           │ Port 80 (HTTP)
                    ┌──────▼───────┐
                    │   BigFix     │
                    │   Server     │──── BigFix Console
                    │  (Root)      │     Port 52311 (HTTPS)
                    └──────┬───────┘
                           │ Port 52311 (HTTP)
               ┌───────────┼───────────┐
        ┌──────▼──────┐         ┌──────▼──────┐
        │   Relay A   │         │   Relay B   │
        └──────┬──────┘         └──────┬──────┘
               │                       │
        ┌──────▼──────┐         ┌──────▼──────┐
        │   Clients   │         │   Clients   │
        └─────────────┘         └─────────────┘

官方原文:「There is at least one server that gathers Fixlets from the Internet where they can be viewed by the console operator and distributed to the relays.」「Clients gather Fixlets and action information from relays.」「Typically a Relay is deployed for every 500-1,000 computers.」

元件說明

元件 功能
BigFix Server 核心伺服器,從 HCL 取得 Fixlet 內容,管理所有端點
BigFix Console 管理介面(Windows 桌面應用),連接 Server 操作
BigFix Relay 中繼站,分擔 Server 負載,壓縮上行資料
BigFix Client 安裝在受管端點上的代理程式
Web Reports 網頁報表介面(與 Server 一起或獨立安裝)
WebUI 新式網頁管理介面

2. 系統需求

出處: Server requirements + Capacity Planning v10

2.1 BigFix Server 硬體需求

出處: Capacity Planning Guide (Mark Leitch, BigFix Platform Performance Engineering), Section 3.3.1

管理端點數 CPU 記憶體 儲存空間
< 1,000 4 cores 16 GB 100 GB
5,000 8 cores 32 GB 200 GB
20,000 12 cores 48 GB 400 GB
50,000 16 cores 64 GB 600 GB
100,000 20 cores 96 GB 800 GB
200,000 24 cores 120 GB 1,200 GB
300,000 28 cores 144 GB 1,500 GB

儲存效能要求(Capacity Planning Section 3.1.4):

2.2 作業系統支援

出處: Server requirements 官方原文:「Only the 64-bit architecture is supported for installing the BigFix server and Web Reports.」

2.3 資料庫支援

出處: Database requirements + What’s New

資料庫 Windows Server Linux Server
MS SQL Server 2014-2022
MS SQL Server 2019/2022 ✅ (RHEL 9+, Patch 1+)
MS SQL Server 2025 ✅ (Patch 6+)
IBM DB2 V11.5 (GA/11.5.4-11.5.9)

官方原文(What’s New):「The minimum supported SQL Server version is 2014 as Microsoft SQL Server 2012 is no longer supported.」

出處: Installing the primary server 官方原文:「On Windows the BigFix V11 server and Web Reports components support only 64 bit architecture. The version of Microsoft SQL Server installed with BigFix is SQL Server Evaluation, which is a fully-functional version for a limited time (180 days).」

⚠️ Linux RHEL 9 + MSSQL 僅支援 SQL Authentication(出處:Installing with MSSQL) 官方原文:「Only the SQL Authentication method is supported … DSA environments are not supported on BigFix Linux Server with MS SQL.」

2.4 Relay 硬體需求

出處: Capacity Planning Guide, Figure 11

配置 CPU 記憶體 管理端點數
標準(Leaf Relay) 1-2 cores 2-4 GB 1,000
高負載 2-4 cores 4-8 GB 5,000

3. 網路與防火牆設定

出處: Server requirements + Basic deployment

3.1 Port 一覽表

Port 協定 用途 出處
52311 TCP+UDP Server ↔ Relay ↔ Client 主要通訊 Server requirements:「Port 52311 for UDP and TCP/IP」
52311 TCP Console → Server HTTPS Basic deployment:「A dedicated port (defaulting to 52311) is used for HTTPS communications between servers and Consoles」
8083 TCP Web Reports HTTPS Server requirements:「Port 8083 for Web Reports and TCP/IP」
443 TCP WebUI HTTPS Installing with MSSQL:預設值
80 TCP WebUI HTTP 重導向 / Fixlet 下載 Installing with MSSQL:預設值
1433 TCP MS SQL Server 標準 MSSQL 預設
50000 TCP IBM DB2 Installing with DB2:預設值
52314 TCP Proxy Agent 專用,禁止用於元件間通訊 見下方

出處: Installing the primary server, Step 10 官方原文:「No other application can be listening on the BigFix port or errors will occur. Do not use port number 52314 for the network communication between the BigFix components because it is reserved for proxy agents.」

3.2 防火牆規則範例

Windows 防火牆(⚡ 以下指令為根據官方 Port 需求撰寫,經 Microsoft netsh 文件 驗證語法正確。需以系統管理員身分執行 CMD/PowerShell):

netsh advfirewall firewall add rule name="BigFix" dir=in action=allow protocol=TCP localport=52311
netsh advfirewall firewall add rule name="BigFix UDP" dir=in action=allow protocol=UDP localport=52311
netsh advfirewall firewall add rule name="BigFix WebReports" dir=in action=allow protocol=TCP localport=8083
netsh advfirewall firewall add rule name="BigFix WebUI" dir=in action=allow protocol=TCP localport=443

Linux (iptables)

📌 出處: Configuring a Local Firewall

iptables -I INPUT -p tcp --dport 52311 -j ACCEPT
iptables -I INPUT -p udp --dport 52311 -j ACCEPT
iptables -I INPUT -p tcp --dport 8083 -j ACCEPT
service iptables save

Linux (firewalld)

⚠️ RHEL 7+ 使用 firewalld,BigFix 安裝程式不會自動設定 firewalld 規則,必須手動配置。 ⚡ 以下 firewall-cmd 指令為根據官方 Port 需求撰寫的範例,官方文件僅提供 iptables 版本:

firewall-cmd --state                              # 先確認 firewalld 運行中
firewall-cmd --permanent --add-port=52311/tcp
firewall-cmd --permanent --add-port=52311/udp
firewall-cmd --permanent --add-port=8083/tcp
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --reload
firewall-cmd --list-ports                         # 驗證規則已生效

4. 安裝前準備

出處: Installing the primary server

Checklist

SQL Server Collation 要求

出處: Database requirements + IBM APAR IV78597

三級一致規則:Server Level、Database Level、Column Level 的 Collation 必須完全一致,且必須為 Case Insensitive。

建議使用:SQL_Latin1_General_CP1_CI_AS

⚠️ 實際案例:BigFix Forum 有使用者因 126 個 column 的 collation 不一致,導致升級被阻擋。


5. BigFix Server 安裝(Windows + MSSQL)

出處: Installing the primary server 這是 HCL 官方文件記載的完整安裝流程,以下為官方步驟的中文整理。

5.1 安裝步驟

Step 1 — 啟動 Installation Guide

Step 2 — 點擊「Install or Upgrade Server」

Step 3 — Welcome 頁面,點 Next

Step 4 — 選擇要安裝的功能(Features),點 Next

Step 5 — 閱讀授權合約,點 Yes 接受

Step 6 — 檢視 Server 元件清單(一般接受預設),點 Next

Step 7 — 資料庫類型選擇

Step 8 — 資料庫位置

Step 9 — Server 安裝目錄

Step 10 — Server 屬性

Step 11-12 — Proxy 設定(若需要透過 Proxy 連線)

Step 13 — Web Reports 設定

Step 14 — 確認參數,點 Next

Step 15 — 授權金鑰

Step 16 — 建立初始管理帳號

Step 17 — 完成安裝

Step 18 — 安裝 Client

Step 19 — 驗證

5.2 安裝路徑

元件 預設路徑
Server C:\Program Files (x86)\BigFix Enterprise\BES Server
Console C:\Program Files (x86)\BigFix Enterprise\BES Console
Client Installer C:\Program Files (x86)\BigFix Enterprise\BES Installers\Client

6. BigFix Server 安裝(Linux + MSSQL)

出處: Installing the Server with MS SQL 自 BigFix 11 Patch 1 起支援 RHEL 9 + MS SQL Server。以下為官方文件的 30 步完整安裝流程。

前置條件

安裝步驟

# 解壓並執行
tar xzf ServerInstaller_ms_11.0.6.137-rhe7.x86_64.tgz
cd ServerInstaller_ms_*
./install.sh

# 或產生 response file 供未來無人值守安裝
./install.sh -g response.txt

互動式安裝流程(官方文件記載 30 步):

步驟 設定項目 預設值 / 說明
2 安裝類型 2 Production(1 是 Evaluation,無增強安全)
3 授權合約 1 接受
4 元件選擇 1 安裝全部
5 資料庫位置 1 Local(建立 BFEnterprise + BESReporting
6 Server Root 資料夾 /var/opt/BESServer
7 Web Reports Root 資料夾 /var/opt/BESWebReportsServer
8 Web Reports HTTPS Port 8083
9 WebUI HTTPS Port 443
10 WebUI HTTP Redirect Port 80
11 SQL Server 管理帳號 預設 sa
12 SQL Server 管理密碼 (輸入兩次驗證)
13 BigFix 管理帳號 預設 BFAdmin
14 BigFix 管理密碼 (設定密碼)
15 防火牆設定 1 自動設定 / 2 手動(firewalld 需手動)
16 授權設定方式 1 授權檔 / 2 既有 license / 3 既有 masthead
17 Proxy 設定 1 用 Proxy / 2 不用
19 Server DNS/IP ⚠️「cannot be changed after a license is created」
20 私鑰密碼 Site Admin Private Key 加密密碼
21 HTTPS 金鑰長度 1 2048 bits / 2 4096 bits
22 授權檔存放目錄 預設 ./license(含 license.crt, license.pvk, masthead.afxm)
25 內容編碼 預設 [8] Western European (1252)
30 SQL Server Port 1433

安裝日誌


7. BigFix Server 安裝(Linux + DB2)

出處: Installing and configuring DB2 以下為官方文件記載的完整流程。

前置條件

安裝步驟

tar xzf ServerInstaller_11.0.6.137-rhe7.x86_64.tgz
cd ServerInstaller_*
./install.sh

安裝流程與 MSSQL 版本類似,差異在:


8. BigFix Relay 安裝

出處: Basic deployment + Efficient relay setup 官方原文:「Typically a Relay is deployed for every 500-1,000 computers.」

8.1 Windows Relay

下載:https://software.bigfix.com/download/bes/110/BigFix-BES-Relay-11.0.6.137.exe

執行安裝程式後指定上游連線點(Parent Server 或 Parent Relay)。

8.2 Linux Relay

下載:https://software.bigfix.com/download/bes/110/BESRelay-11.0.6.137-rhe7.x86_64.rpm

sudo rpm -ivh BESRelay-11.0.6.137-rhe7.x86_64.rpm

8.3 從 Console 推送(最常用)

在 BigFix Console 中,找到已安裝 Client 的機器 → 執行「Install BigFix Relay」Fixlet → 系統自動完成。

8.4 Top-Level Relay

出處: Efficient relay setup 官方原文:「There is a dedicated server computer known as the Top-Level relay that is used to take the load off the server computer. The general rule for configuring relays is that you want as few levels as possible to the relays unless there is a bandwidth bottleneck.」


9. BigFix Client 安裝

出處: Installing the primary server, Step 18

9.1 Windows Client

下載

手動安裝

  1. 從 Server 的 C:\Program Files (x86)\BigFix Enterprise\BES Installers\Client\ 取得 setup.exe + masthead.afxm
  2. 執行 setup.exe

靜默安裝

📌 出處: Installing Client .exe setup

setup.exe /s /v"/L*vx! \"C:\ClientInstallLog.txt\" SETUPEXE=1 REBOOT=ReallySuppress MSIRESTARTMANAGERCONTROL=Disable /qn"

可選參數:INSTALLDIR 指定安裝路徑、STARTAGENTSERVICE=0 安裝後不啟動服務。

安裝路徑C:\Program Files (x86)\BigFix Enterprise\BES Client

9.2 Linux Client

下載:https://software.bigfix.com/download/bes/110/BESAgent-11.0.6.137-rhe7.x86_64.rpm

📌 出處: Red Hat Installation Instructions

rpm -ivh BESAgent-11.0.6.137-rhe7.x86_64.rpm
cp masthead.afxm /etc/opt/BESClient/actionsite.afxm   # 目錄不存在需先 mkdir
systemctl start besclient

⚠️ RHEL 9 需先安裝 initscripts 套件。v11.0.2+ 已移除 init.d 腳本,僅支援 systemctl。

9.3 關鍵檔案

檔案 用途
BESClient.exe Client 主程式
ActionSite.afxm 站台刊頭檔(指向 Server/Relay)
__BESData\ Client 資料目錄(服務啟動後自動產生)

10. 憑證與安全設定

10.1 安裝時產生的憑證

出處: Installing with MSSQL 官方原文:「Choose License Folder: Specify a folder for your private key (license.pvk), license certificate (license.crt), and site masthead (masthead.afxm).」

檔案 用途
license.crt 授權憑證
license.pvk 私鑰(遺失無法復原,務必備份
masthead.afxm 站台刊頭檔,所有 Client 需要

10.2 加密金鑰長度

官方原文:「Min Level (2048 bits)」「Max Level (4096 bits)」— 4096 為預設。

10.3 BigFix 11 安全特性

出處: What’s New in BigFix 11

官方原文:「BigFix Platform 11 will no longer support TLS 1.1 or below in ANY scenario requiring HTTPS.」

10.4 Patch 4+ 進階功能

出處: What’s New 官方原文:「With the setcustomca BESAdmin command, you can install an external Certificate Authority (CA) in the BigFix Platform.」

功能 指令
自訂 CA BESAdmin -setcustomca
憑證輪替 BESAdmin -rotatewebuicredentials
HADR 高可用 基於資料庫複寫 + 叢集管理

10.5 Client 憑證自動輪替

出處: Client certificate

BigFix 10.0.7+ 起,Agent 自動從 10 年期憑證切換為 13 個月期憑證(前提:整條 Relay 鏈都是 10.0.7+)。


11. 安裝後驗證

11.1 Server 驗證

Windows:執行 BigFix Diagnostics Tool(Start > Programs > BigFix > BigFix Diagnostics Tool)

⚡ 以下 PowerShell 指令為補充範例,非官方文件提供:

Get-Service "BESRootServer"
Get-Service "BESWebReportsServer"
netstat -an | findstr "52311"

Linux

📌 出處: Managing BigFix Services

systemctl status besserver
systemctl status beswebreports
systemctl status besclient

11.2 Console 驗證

出處: Installing the primary server, Step 19

  1. 安裝 BigFix Console(下載:https://software.bigfix.com/download/bes/110/BigFix-BES-Console-11.0.6.137.exe)
  2. 連線至 https://<server>:52311
  3. 使用 Step 16 建立的管理帳號登入

11.3 Client 註冊驗證

出處: Troubleshooting Client Registration(BigFix Forum 官方社群)

成功指標(Client 日誌):

失敗指標


12. 部署架構規劃

出處: Basic deployment + Efficient relay setup + Capacity Planning

小型(< 1,000 端點)

所有元件同一台,不需要 Relay。

中型(1,000 - 20,000 端點)

1:500-1,000 比例部署 Relay。

大型(20,000 - 300,000 端點)

官方原文:「There is a dedicated server computer known as the Top-Level relay that is used to take the load off the server computer.」

部署 Top-Level Relay,Server / Web Reports / WebUI / DBMS 可分離部署。

單台 Root Server 最大支援:300,000 台裝置(Capacity Planning Section 3.3.1,自 BigFix 10.0.4 起)。


13. 常見問題與疑難排解

13.1 Client 服務意外終止

出處: 台灣代理商提供的《BigFix Client 服務終止處理方式》技術文件

原因ActionSite.afxm 損壞或 __BESData 目錄資料毀損

處理

  1. 從 Server 的 BES Installers\Client\ 複製 masthead.afxm → 重新命名為 ActionSite.afxm → 覆蓋 Client 端原檔
  2. 停止 BES Client → 重新命名 __BESData__BESData_old → 重啟服務 → 等 1-2 分鐘自動重建

13.2 Client 無法註冊

出處: Troubleshooting Client Registration + Multiple problems in relay/clients not registering

排查步驟:

  1. 確認 Port 52311 TCP+UDP 連通:telnet <server> 52311
  2. 確認防火牆
  3. 確認 EDR/防毒未阻擋 BESClient.exe
  4. 確認 ActionSite.afxm 指向正確 Server

13.3 SQL Server 登入錯誤 (Error 18456)

出處: BigFix Forum: Startup failed error testing database connection

原因:安裝程式可能錯誤建立 ODBC DSN,使用 Windows Authentication 而非 SQL Authentication

處理:開啟 ODBC 資料來源管理員 → 確認 BFEnterpriseBESReporting 的 DSN 使用 SQL Server 驗證

13.4 Collation 不一致

出處: Database requirements + IBM APAR IV78597

確認方式(⚡ 標準 SQL Server 查詢語法,非 BigFix 官方提供):

SELECT SERVERPROPERTY('Collation')
SELECT name, collation_name FROM sys.databases WHERE name IN ('BFEnterprise', 'BESReporting')

13.5 已知問題(11.0.6)

出處: 11.0.6 Release Page

⚠️ Audit Trail Cleaner 工具可能導致 WebUI 資料顯示異常。 詳見:https://forum.bigfix.com/t/important-unexpected-behaviour-in-11-0-6-audit-trail-cleaner-may-be-causing-webui-data-display-issues/54817


14. 參考資料

官方安裝文件(本手冊主要來源)

文件 連結 本手冊引用段落
Installation Overview https://help.hcl-software.com/bigfix/11.0/platform/Platform/Installation/c_overview.html §1, §10
Server Requirements https://help.hcl-software.com/bigfix/11.0/platform/Platform/Installation/c_bigfix_server.html §2, §3
Installing the Primary Server (Windows) https://help.hcl-software.com/bigfix/11.0/platform/Platform/Installation/c_installing_the_primary_server.html §4, §5, §9, §11
Installing with MS SQL (Linux) https://help.hcl-software.com/bigfix/11.0/platform/Platform/Installation/c_installing_with_mssql.html §6, §10
Installing with DB2 (Linux) https://help.hcl-software.com/bigfix/11.0/platform/Platform/Installation/c_installing_with_db2.html §7
Database Requirements https://help.hcl-software.com/bigfix/11.0/platform/Platform/Installation/c_database_requirements.html §2, §4, §13
Basic Deployment https://help.hcl-software.com/bigfix/11.0/platform/Platform/Installation/c_basic_deployment.html §1, §3, §12
Efficient Relay Setup https://help.hcl-software.com/bigfix/10.0/platform/Platform/Installation/c_efficient_relay_setup.html §8, §12
What’s New in BigFix 11 https://help.hcl-software.com/bigfix/11.0/platform/Platform/Installation/c_versions.html §2, §10
Client Certificate https://help.hcl-software.com/bigfix/10.0/platform/Platform/Config/c_client_certificate.html §10

容量規劃

文件 連結 本手冊引用段落
Capacity Planning Guide (v10) https://bigfix-mark.github.io/Docs/BigFix%20Capacity%20Planning%20v10.pdf §2, §8, §12
Relay Scale Blog https://bigfix-mark.github.io/Blogs/BigFix%20Relay%20Scale%20Blog%20v3.pdf §8

社群與支援

資源 連結 本手冊引用段落
Client Registration 疑難排解 https://forum.bigfix.com/t/troubleshooting-client-registration/28553 §11, §13
Relay/Client 註冊問題 https://forum.bigfix.com/t/multiple-problems-in-relay-clients-not-registering/45555 §13
SQL Server 登入錯誤 https://forum.bigfix.com/t/startup-failed-error-testing-database-connection/15940 §13
11.0.6 已知問題 https://forum.bigfix.com/t/important-unexpected-behaviour-in-11-0-6-audit-trail-cleaner-may-be-causing-webui-data-display-issues/54817 §13

下載

資源 連結
HCL 下載入口(需登入) https://my.hcltechsw.com/downloads/bigfix/suite
BigFix Download Center https://support.bigfix.com/bes/install/downloadbes.html
11.0.6 Release Page(全元件下載) https://support.bigfix.com/bes/release/11.0/patch6/
Technical Changelist https://support.bigfix.com/bes/changes/fullchangelist-110.txt

台灣代理商

BigFix 在台灣有代理商提供在地化技術支援,可透過 HCL 官方網站查詢合作夥伴清單。


附錄 A:Server 遷移與災難復原

當舊 Server 故障需要在新主機重建,或升級到新版本時適用。 出處: Server Migration + Migration Considerations + BigFix Forum 討論

A.1 遷移可行性:舊 Server 掛了能重建嗎?

可以,但難度取決於是否保有舊 Server 的授權檔案:

情境 難度 說明
license.pvk + license.crt + masthead.afxm 新機安裝時選「Use existing production license」,現有 Client 不用重裝
masthead.afxm沒有 license.pvk 需聯絡 HCL Support 討論選項,可能需要 masthead switch
三個檔案都沒有 全新安裝 + 所有 Client 重新部署

出處: Lost license.pvk discussion 社群原文:「The license.pvk is a private key to a certificate. Like any private certificate key, it cannot be recreated from the public key data.」— license.pvk 遺失無法復原

A.2 路線一:有舊授權檔案 → 無痛遷移

出處: Server Migration 完整程序

前置條件

步驟摘要(官方 Server Migration 文件的濃縮):

Step 1:備份舊 Server 的關鍵檔案

出處: Server Backup

授權與憑證(最重要,遺失無法復原):

資料目錄

官方建議:「Consider backing up to a remote system to allow for higher fault tolerance.」

Step 2:備份 SQL Server 資料庫

出處: Server Backup + Migrating databases

BigFix 使用兩個資料庫,兩個都要備份

資料庫 內容
BFEnterprise Server 核心資料(Fixlet、Action、電腦清單、操作員帳號)
BESReporting Web Reports 報表資料

方法 A:SSMS 圖形介面備份(適合一般操作)

  1. 開啟 SQL Server Management Studio (SSMS)
  2. 連線到 SQL Server 實例
  3. 展開 Databases → 右鍵 BFEnterprise → Tasks → Back Up…
  4. Backup type 選 Full
  5. Destination 點 Add → 選擇備份檔路徑(例如 D:\Backup\BFEnterprise.bak
  6. 點 OK 開始備份
  7. BESReporting 重複同樣步驟

方法 B:T-SQL 指令備份(適合腳本化 / 遠端操作)

⚡ 以下 T-SQL 為根據 SQL Server 標準語法撰寫,經 Microsoft 官方文件 驗證語法正確。BigFix 官方文件僅建議「Using SQL Server Enterprise Manager, establish a maintenance plan for nightly backups」,未提供具體備份 T-SQL。

-- 備份 BFEnterprise
BACKUP DATABASE [BFEnterprise]
TO DISK = N'D:\Backup\BFEnterprise.bak'
WITH FORMAT, INIT, COMPRESSION,
NAME = N'BFEnterprise-Full Backup';
GO

-- 備份 BESReporting
BACKUP DATABASE [BESReporting]
TO DISK = N'D:\Backup\BESReporting.bak'
WITH FORMAT, INIT, COMPRESSION,
NAME = N'BESReporting-Full Backup';
GO

⚠️ COMPRESSION 選項在 SQL Server Express 版不支援(Standard / Enterprise 可用)。Express 環境需移除此參數。

方法 C:Detach / Attach(適合同版本 SQL Server 間直接搬移)

出處: Migrating databases 官方原文:「Detach the BFEnterprise and BESReporting databases from the current SQL Server instance.」「Attach the BFEnterprise and BESReporting databases to the new SQL Server instance.」

⚡ 以下 T-SQL 為根據官方 Detach/Attach 描述撰寫,經 Microsoft sp_detach_db 文件CREATE DATABASE FOR ATTACH 文件 驗證語法正確:

⚠️ Detach 前必須先停止 BigFix 服務並斷開所有資料庫連線,否則會失敗。

-- 在舊 Server 上 detach(先停止 BigFix 服務再執行)
USE master;
GO
ALTER DATABASE [BFEnterprise] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO
EXEC sp_detach_db @dbname = N'BFEnterprise';
GO
ALTER DATABASE [BESReporting] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO
EXEC sp_detach_db @dbname = N'BESReporting';
GO

然後把 .mdf.ldf 檔案複製到新 Server,再 attach:

-- 在新 Server 上 attach(兩個資料庫都要)
USE master;
GO
CREATE DATABASE [BFEnterprise]
ON (FILENAME = N'D:\SQLData\BFEnterprise.mdf'),
   (FILENAME = N'D:\SQLData\BFEnterprise_log.ldf')
FOR ATTACH;
GO

CREATE DATABASE [BESReporting]
ON (FILENAME = N'D:\SQLData\BESReporting.mdf'),
   (FILENAME = N'D:\SQLData\BESReporting_log.ldf')
FOR ATTACH;
GO

額外備份項目

-- 備份 Index Reorganization Job(在 SSMS 中)
-- SQL Server Agent → Jobs → 右鍵「BFEnterprise Full Database Index Reorganization」
-- → Script Job as → CREATE To → File...
-- 存為 .sql 檔,遷移後在新 Server 執行

Step 3:記錄舊 Server 設定

出處: Server Migration 官方原文:「Use SQL Server Management Studio to examine the DBINFO table in the BFEnterprise database. Record all column values. Check the REPLICATION_SERVERS table.」

SELECT * FROM BFEnterprise.dbo.DBINFO;
SELECT * FROM BFEnterprise.dbo.REPLICATION_SERVERS;

Step 4:在新主機安裝 BigFix Server

Step 5:還原資料庫到新 SQL Server

出處: Server Recovery

如果使用 Backup / Restore 方式

-- 在新 SQL Server 上還原
RESTORE DATABASE [BFEnterprise]
FROM DISK = N'D:\Backup\BFEnterprise.bak'
WITH REPLACE;
GO

RESTORE DATABASE [BESReporting]
FROM DISK = N'D:\Backup\BESReporting.bak'
WITH REPLACE;
GO

遷移 Console Operators 的 SQL 帳號

出處: Server Migration 官方原文:「Migrate SQL Accounts for Console Operators to new server’s SQL instance.」

⚡ 具體做法可用 sp_help_revlogin 或手動建立帳號,確認 SID 一致(否則需 ALTER USER ... WITH LOGIN = ... 修正 orphaned users)——此為標準 SQL Server 遷移技巧。

Step 6:重新設定 ODBC

出處: Migrating databases

修改以下 System DSN 指向新的 SQL Server 實例:

⚠️ 用 32-bit ODBC 工具(C:\Windows\SysWOW64\odbcad32.exe)設定後測試連線

Step 7:複製資料目錄

從舊 Server 複製到新 Server(覆蓋安裝程式產生的預設檔案):

Step 8:驗證資料庫完整性

-- 比對遷移前後的值應一致
SELECT * FROM BFEnterprise.dbo.DBINFO;
SELECT * FROM BFEnterprise.dbo.REPLICATION_SERVERS;

Step 9:啟動服務 + DNS 切換

  1. 執行 BigFix Administration Tool(不帶參數)確認資料庫連線
  2. 啟動所有 BES 服務
  3. 將 DNS 別名指向新 Server IP
  4. 等待約 20 分鐘 DNS 傳播

Step 10:驗證

出處: 官方原文:「Send a blank action, (choose the option under ‘Tools’ > ‘Take Custom Action’ and target ‘All Computers’) to test communication paths.」

⚠️ 注意事項(出處:Server Recovery):

  • Registry 設定不會自動還原,需手動重新配置
  • Web Reports 的 HTTPS 和 Email 設定需重新配置
  • 還原後 Client 可能會註冊為新電腦(需執行 client duplication prevention)

A.3 路線二:沒有舊授權檔案 → 全新安裝 + Client 重部署

出處: Missing license.pvk + Forum migration discussion

  1. 在新主機執行全新安裝(產生新 license + 新 masthead)
  2. 向 HCL License Key Center 申請新的授權檔
  3. 所有 Client 需替換 ActionSite.afxm 為新的 masthead

Client 切換方式

社群原文:「Performing a masthead switch is much easier to do while you have the old deployment still up and running, as you can send an action from the old server to switch clients to the new one.」

A.4 版本升級路徑

出處: Upgrade paths + Before upgrading

來源版本 Server 升級到 11 Client 升級到 11
9.5.x ❌ 不支援直升 ✅ 支援
10.0.0 ~ 10.0.6 ❌ 需先升到 10.0.7+ ✅ 支援
10.0.7+ ✅ 支援 ✅ 支援

官方原文:「The BigFix server must be at Version 10.0.7 or later before you can upgrade it to Version 11.0.」 官方原文:「BigFix clients and relays earlier than Version 9.5 are not supported.」

升級前必做(出處:Before upgrading):

  1. 啟用 Enhanced Security(需提前規劃,需要時間在環境中傳播)
  2. 停止 WebUI 服務(升級完成前不要重啟)
  3. 停止所有遠端 Web Reports 服務
  4. 關閉所有 Console
  5. 備份 license.pvklicense.crtmasthead.afxm
  6. 完整備份 BFEnterprise / BESReporting 資料庫
  7. 確認資料庫有足夠空間
  8. 如需要,先升級 SQL Server 版本

A.5 跨版本 DB 還原:從 10.x 備份直接升級到 11

出處: Upgrade paths + Server Recovery 官方原文:「The BigFix server must be at Version 10.0.7 or later before you can upgrade it to Version 11.0.」 官方原文(Server Recovery):「Download matching patch level Installer Generator … Run Installation Generator, selecting ‘I want to install with an existing masthead’.」

核心問題:能不能把 10.x 的 DB 備份直接還原到 11.0 的新 Server?

可以,前提是舊 Server 版本 ≥ 10.0.7。官方升級路徑文件明確指出 10.0.7 是升級到 11 的最低版本。Server Recovery 程序支援還原後安裝不同版本。

⚡ 以下相容性表格為根據官方升級路徑規則推導:

舊 DB 版本 直接還原到 11.0? 說明
10.0.7 ~ 10.0.15 ✅ 可以 符合官方升級路徑要求
10.0.0 ~ 10.0.6 ❌ 不行 低於官方最低要求 10.0.7
9.5.x ❌ 不行 官方明確不支援

具體流程(10.0.7+ → 11.0.6)

1. 從舊 10.x Server 備份 BFEnterprise.bak + BESReporting.bak
2. 從舊 Server 搶救 license.pvk / license.crt / masthead.afxm
3. 新主機安裝 SQL Server(版本需符合 11.0 要求:2014-2022)
4. 還原 10.x 的 DB 到新 SQL Server(RESTORE DATABASE ... WITH REPLACE)
5. 安裝 BigFix 11.0.6 Server
   → Production mode
   → 選「Use existing masthead」或「Use existing production license」
   → 安裝程式偵測到 10.x DB → 自動升級 schema 到 11.0
6. DNS 指向新主機
7. 現有 Client 自動連上新 Server
8. 透過 Console 推送 Client 升級 Fixlet → Client 自動升級到 11.0.6

⚠️ Client 從 10.x 升級到 11 是支援的(甚至 9.5 的 Client 也可以直升 11),所以 Server 升上去後,Client 可以直接透過 Console 推送升級 Action。

如果舊版本低於 10.0.7 怎麼辦?

兩條路:

選項 做法 適用情境
A:中繼升級 先在測試環境裝 10.0.7 → 還原舊 DB → 升級到 10.0.7 → 再備份 → 還原到 11.0 舊 DB 有重要歷史資料必須保留
B:全新安裝 放棄舊 DB,直接裝 11.0.6 + 新 license + masthead switch 重部署 Client 歷史資料不重要,追求乾淨環境

SQL Server 版本也要注意(⚡ 此為 SQL Server 通用知識,非 BigFix 官方文件):

舊 SQL Server 版本 還原到新 SQL Server?
舊版 → 新版(如 2016 → 2022) ✅ 可以(SQL Server 支援向上還原)
新版 → 舊版(如 2022 → 2016) ❌ 不行(SQL Server 不支援向下還原)

所以新 Server 的 SQL Server 版本必須 ≥ 舊 Server 的版本

A.6 「舊 Server 掛了 + 想升級」的完整建議流程

結合遷移與升級,建議流程:

1. 從舊 Server 硬碟搶救 license.pvk / license.crt / masthead.afxm
   (路徑:C:\Program Files (x86)\BigFix Enterprise\BES Server\)
2. 備份舊的 SQL 資料庫(BFEnterprise + BESReporting)
3. 確認舊 BigFix 版本 ≥ 10.0.7(否則參考上方「低於 10.0.7 怎麼辦」)
4. 新主機安裝 SQL Server(版本 ≥ 舊 Server 的 SQL 版本)
5. 還原 DB 到新 SQL Server
6. 安裝 BigFix 11.0.6 Server(用舊 license,DB 自動升級 schema)
7. DNS 指向新主機
8. 現有 Client 自動連上新 Server
9. 透過 Console 推送 Client 升級 Fixlet → Client 自動升級到 11.0.6

⚠️ 如果舊 Server 版本低於 10.0.7 且舊 Server 已完全無法啟動,最務實的做法是:全新安裝 11.0.6 + 新 license + 透過 GPO/SCCM 派送新 masthead 給所有 Client(放棄舊資料庫歷史資料)。


附錄 B:Masthead(刊頭檔)運作機制

出處: What is a BigFix masthead file? + Editing the Masthead + Configuration and Masthead Files

B.1 Masthead 是什麼?

masthead.afxm(又稱 ActionSite masthead)是 BigFix 的核心配置 + 信任根,格式為簽章式 MIME 檔案(Signed MIME),結合了三種資訊:

類別 內容
配置資訊 Server 的 DNS / IP、Port(預設 52311)、GatherURL
授權資訊 授權的 Client 數量、授權期限
安全資訊 Server 的公鑰(Public Key),用於數位簽章驗證

官方原文:「The masthead contains information necessary for the digital signature security scheme that BigFix uses (the masthead contains the public key information), and the licensing information that allows BigFix users to run BigFix with a specified number of users for a specified length of time.」

B.2 安全模型:數位簽章信任鏈

license.pvk(私鑰)          masthead.afxm(公鑰)
    │                              │
    │ 簽署 Fixlet / Action         │ 驗證簽章
    ▼                              ▼
Server 簽發內容 ──────────→ Client 驗證內容真實性

官方原文:「The Fixlet site author signs each message with a key that can be traced back to the BigFix root for authentication. This signature must match the Fixlet site’s masthead. This procedure prevents spoofing and man-in-the-middle attacks, and guarantees that the Fixlets you receive are from the original certified author.」

B.3 Masthead 在各元件的位置

出處: Configuration and Masthead Files

元件 Windows 路徑 Linux 路徑
Server BES Installers\Client\masthead.afxm
Client BES Client\ActionSite.afxm /etc/opt/BESClient/actionsite.afxm
Relay BES Relay\actionsite.afxm /etc/opt/BESRelay/actionsite.afxm

⚠️ Server 上的叫 masthead.afxm,複製到 Client 端時改名為 ActionSite.afxm——是同一個檔案,只是命名不同

B.4 可以線上取得 Masthead

出處: How to get a Masthead file?

任何能連到 Server 的機器都可以透過 HTTP 下載:

http://<server>:52311/masthead/masthead.afxm

這是設計上的正常行為——masthead 只包含公鑰,不含私鑰,公開下載不會有安全風險。

B.5 可以編輯 Masthead 嗎?

出處: Editing the Masthead on Windows

可以,但必須透過 BigFix Administration Tool,不能直接文字編輯:

  1. 開啟 BigFix Administration Tool(Start > Programs > BigFix > BigFix Administration Tool)
  2. 瀏覽選擇 license.pvk,輸入密碼
  3. 切換到 Masthead Management 分頁
  4. Edit Masthead
  5. 修改參數 → 點 OK
  6. 工具會用私鑰重新簽署 masthead

可修改的參數

參數 說明 注意事項
Server Port 通訊 Port ⚠️ 部署後不建議修改,可能導致 BigFix 異常
Gathering Interval Client 檢查更新的頻率  
Initial Action Lock 新 Client 是否預設鎖定  
Action Lock Controller 誰控制鎖定(Console 或 Client)  
Fallback Relay Client 找不到 Relay 時的備援 支援 hostname / FQDN / IP
FIPS 140-2 啟用聯邦加密標準  

B.6 為什麼不能直接文字編輯 Masthead?

⚡ 以下解釋為根據官方數位簽章描述推導的技術原理:

官方已說明 masthead 使用數位簽章(「signs each message with a key」「This signature must match the Fixlet site’s masthead」),因此:

  1. 內容改了,但簽章還是舊的
  2. Client 驗證簽章 → 不符 → 拒絕接受
  3. 結果:Client 視為無效 masthead,無法運作

唯一合法的修改方式是透過 Administration Tool,因為它持有 license.pvk(私鑰),修改後會重新簽署

B.7 Masthead 修改後的影響

官方原文:「The masthead changes do NOT affect clients that are already deployed.」

B.8 Hacking 小結:能做什麼、不能做什麼

操作 可行? 說明
直接文字編輯 masthead 改 Server IP 簽章會失效,Client 拒絕接受
用 Admin Tool 改 Fallback Relay 官方支援,需要 license.pvk
用 Admin Tool 改 Port ⚠️ 技術上可以,但部署後不建議
從 HTTP 下載別人的 masthead 裝到自己 Client 這就是 Client 安裝的正常流程
用舊 masthead 在新 Server 上安裝 遷移的標準做法
沒有 license.pvk 修改 masthead 私鑰是重新簽署的必要條件
masthead.afxm 反向推導出 license.pvk 公鑰無法推導私鑰(密碼學基本原理)

附錄 C:BigFix Administration Tool

出處: Editing the Masthead on Windows + Submitting the license request

C.1 Administration Tool 是什麼?

BigFix Administration Tool(BESAdmin.exe)是 Server 端的管理工具,用於:

功能 說明
Masthead 管理 編輯、匯出、重新簽署 masthead
授權管理 提交授權請求、更新 license
憑證操作 自訂 CA(Patch 4+)、WebUI 憑證輪替
資料庫管理 初始化、連線設定

C.2 如何取得?

Administration Tool 不是獨立下載的元件,而是隨 Server 安裝程式一起安裝

安裝 BigFix-BES-Server-11.0.6.137.exe(或 Linux 的 ServerInstaller)後,工具自動部署在 Server 上。

Windows 路徑

C:\Program Files (x86)\BigFix Enterprise\BES Server\BESAdmin.exe

啟動方式

Start > Programs > BigFix > BigFix Administration Tool

Linux 路徑

/opt/BESServer/bin/BESAdmin

C.3 使用前提

⚠️ 每次啟動 Administration Tool 都必須提供 license.pvk(私鑰)並輸入密碼。沒有私鑰就無法使用。

啟動 → 瀏覽選擇 license.pvk → 輸入密碼 → 進入管理介面

C.4 Masthead Management 操作

出處: Editing the Masthead on Windows

在 Administration Tool 的 Masthead Management 分頁可以:

Edit Masthead(編輯刊頭)

  1. Edit Masthead 按鈕
  2. 修改參數(Port、Gathering Interval、Fallback Relay 等)
  3. OK → 工具自動用 license.pvk 重新簽署 masthead

Export Masthead(匯出刊頭)

  1. Export Masthead 按鈕
  2. 選擇儲存位置
  3. 產出新的 masthead.afxm
  4. 將此檔放到 BES Installers\Client\ 目錄,新安裝的 Client 即使用新版 masthead

C.5 BESAdmin 命令列模式(Linux / 進階操作)

出處: What’s New in BigFix 11

除了 GUI,BESAdmin 也支援命令列操作,尤其在 Linux 上或需自動化時:

# 安裝自訂 CA(Patch 4+)
BESAdmin -setcustomca <ca-cert-file>

# 輪替 WebUI 憑證(Patch 4+)
BESAdmin -rotatewebuicredentials

C.6 常見情境:何時需要用 Administration Tool?

情境 操作
遷移到新 Server 後想修改 Fallback Relay Edit Masthead → 改 Fallback Relay
新安裝 Client 需要最新 masthead Export Masthead → 放到 BES Installers 目錄
授權過期需更新 提交新的 license request
想使用企業內部 CA 簽發的憑證 BESAdmin -setcustomca(Patch 4+)
忘記 Server 的 masthead 密碼 ❌ 無法重設,需聯絡 HCL Support