Skip to content
< 返回技術文件

多端點部署指南

在多台伺服器上批次安裝和管理 Panguard。

方法一:SSH 批次安裝

最簡單的方式——用 SSH 迴圈逐台安裝。適合 5-20 台伺服器。

deploy.sh
#!/bin/bash
# servers.txt: one IP per line
SERVERS="servers.txt"

while IFS= read -r server; do
  echo "Installing on $server..."
  ssh "root@$server" 'curl -fsSL https://get.panguard.ai | bash'
  echo "Starting guard on $server..."
  ssh "root@$server" 'panguard guard start'
done < "$SERVERS"

echo "Done. All endpoints deployed."

方法二:Ansible Playbook

用 Ansible 自動化部署。適合 20+ 台伺服器或需要冪等性的環境。

panguard.yml
# panguard.yml
---
- name: Deploy Panguard
  hosts: all
  become: yes
  tasks:
    - name: Install Panguard
      shell: curl -fsSL https://get.panguard.ai | bash
      args:
        creates: /usr/local/bin/panguard

    - name: Start Guard
      shell: panguard guard start
      args:
        creates: /etc/systemd/system/panguard-guard.service

# Run: ansible-playbook -i inventory.ini panguard.yml

Threat Cloud 多端點整合

所有端點安裝後會自動上傳威脅情報到 Threat Cloud。在一台伺服器發現的威脅會自動保護所有其他伺服器。

Terminal
# On each endpoint, after install:
panguard login

# Verify connection
panguard status

# View all endpoints in Threat Cloud dashboard
# https://cloud.panguard.ai/endpoints

免費版支援單一端點。多端點管理需要 Starter 方案以上。

部署建議

先在測試環境安裝,確認無衝突後再部署到生產環境

Guard 的 7 天學習期在每台伺服器上獨立計算

使用 panguard scan --json 收集各台掃描結果,匯總分析

用 panguard chat config 設定統一的告警頻道(如一個 Slack channel)