跳至內容

Linux 的安裝程式命令行選項

在安裝 Sophos Protection for Linux 之前,必須從 Sophos Central 下載 SophosSetup.sh 並使檔案可執行。請參閱下載並執行 Linux Server 安裝程式

Linux 命令行選項

這些選項可能尚未適用於所有客戶。

Server Protection for Linux 安裝程式支援以下命令行選項。

說明

顯示 SophosSetup.sh 說明文字。

--help

版本

顯示 SophosSetup.sh 的版本。

--version

強制

強制安裝,即使安裝程式偵測到 Sophos 產品已安裝在裝置上。您可以使用此命令嘗試修復中斷的安裝。

--force

停用 auditd

關閉裝置上的 auditd,以便 Sophos Protection for Linux 可以訂閱稽核 NetLink,並為 Live Discover 提供歷程事件資料。預設情況下設定此選項。

--disable-auditd

請勿停用 auditd

開啟 auditd 或保持開啟(如果已開啟)。如果使用此選項,則會減少您可以查詢的資料,因為它不包含歷程事件資料。

--do-not-disable-auditd

偵錯精簡安裝程式

在偵錯模式下執行 SophosSetup.sh 以進行疑難排解。

export DEBUG_THIN_INSTALLER=1

尾端參數

1 為開,0 為關。

要收集記錄檔中的輸出,必須將輸出重新導向到檔案。

群組

將裝置新增到 Sophos Central 中的特定群組。您也可以使用此選項將裝置新增到子群組。

  • --group=<Central group>
  • --group=<Central group>\\<Central subgroup>

尾端參數

要加入的群組或子群組。如果它不存在,則會建立它。

產品

指定要安裝的產品清單。如果您指定您沒有授權的產品 , 則不會安裝該產品。

--products=<comma-separated list of products>

尾端參數

要安裝的產品清單,以逗號分隔。

可用選項包括:antivirusmdrxdr

TMPDIR

設定安裝程式在安裝過程中使用的其他臨時目錄。當裝置上的 /tmp 未安裝為可執行檔時,您可以在執行 SophosSetup.sh 時使用此項。

TMPDIR=<path to directory>

尾端參數

要安裝程式使用的目錄的路徑。

解除安裝 Sophos Anti-Virus for Linux

停止 SAV 服務並解除安裝 Sophos Anti-Virus for Linux。您可以在安裝 Sophos Protection for Linux 之前使用此項。

!!! info "Sophos Protection for Linux 安裝與 Sophos Anti-Virus for Linux 不相容。在安裝 Sophos Protection for Linux 之前,必須解除安裝 Sophos Anti-Virus for Linux。”

--uninstall-sav

Linux 範例

解除安裝 Sophos Anti-Virus for Linux 並安裝 Sophos Protection for Linux:

sudo ./SophosSetup.sh --uninstall-sav

安裝至子群組:

sudo ./SophosSetup.sh --group=LinuxServers\\MailServers

開啟偵錯模式,使用 verbose shell 選項啟動安裝程式,將 stderrstdout 合併入 stdout 流,並將輸出寫入 install.log

sudo export DEBUG_THIN_INSTALLER=1; bash -x ./SophosSetup.sh 2>&1 | tee install.log

Sophos Protection for Linux 和 auditd

  • 預設情況下,我們關閉 auditd。這意味着您可以在 Live Discover 中查詢歷程事件資料。您可以使用 --do-not-disable-auditd 開啟 auditd
  • 關閉 auditd 也會影響 systemd 日誌是否接收稽核事件。如果關閉 auditd,則不會在 systemd 日誌記錄中接收稽核事件。通常,您可以使用 journalctl 命令存取這些記錄。
  • 解除安裝 Sophos Protection for Linux 不會變更您的 auditd 設定。如果您已關閉 auditd,它將保持關閉狀態。
  • 重新註冊產品不會變更 auditd 設定。