Share via


管理和設定 UNIX/Linux 代理程式

 

發佈時間: 2016年3月

適用於: System Center 2012 R2 Operations Manager, System Center 2012 - Operations Manager, System Center 2012 SP1 - Operations Manager

本主題說明管理和設定適用於 System Center – Operations Manager 的 UNIX/Linux 代理程式的選項。

代理程式目錄

  • UNIX/Linux 代理程式會安裝到下列目錄:/opt/microsoft/scx/

  • UNIX/Linux 代理程式會在下列目錄中維護記錄檔:/var/opt/microsoft/scx/log/

  • 代理程式設定檔案 (包括憑證) 儲存在下列目錄中:/etc/opt/microsoft/scx/

代理程式管理工具

本節說明用來管理和設定 UNIX/Linux 代理程式的工具。

執行代理程式管理工具

用來設定 UNIX/Linux 代理程式的工具位於下列目錄:

/opt/microsoft/scx/bin/tools

執行工具之前,必須提供檔案 /opt/microsoft/scx/bin/tools/setup.sh 的來源。 這可以使用下列命令來完成:

. /opt/microsoft/scx/bin/tools/setup.sh

Scxadmin

scxadmin 工具可用來控制 UNIX/Linux 代理程式的狀態 (啟動、停止或重新啟動),以及控制代理程式執行的記錄功能。 您可以使用下列命令來顯示此工具的用法:scxadmin -?

# /opt/microsoft/scx/bin/tools/scxadmin -?

Usage: scxadmin
Generic options (for all commands)
  [-quiet]      Set quiet mode (no output)

        General Options
scxadmin -version

        Service Management
scxadmin {-start|-stop|-restart|-status}  [all|cimom|provider]

        Providers Management
scxadmin -config-list {RunAs}
scxadmin -config-set {RunAs} {CWD=<directory>|ChRootPath=<directory>|AllowRoot={true|false}}
scxadmin -config-reset {RunAs} [CWD|ChRootPath|AllowRoot]

        Log Configuration Management
scxadmin {-log-list|-log-rotate|-log-reset} [all|cimom|provider]
scxadmin -log-set [all|cimom|provider] {verbose|intermediate|errors}
scxadmin -log-set provider {{FILE:<path>|STDOUT}:<module-id>={SUPPRESS|ERROR|WARNING|INFO|TRACE|HYSTERICAL}}
scxadmin {-log-reset|-log-remove} provider [{FILE:<path>|STDOUT}]

範例

重新啟動代理程式:

cd /opt/microsoft/scx/bin/tools/
./scxadmin -restart

將所有記錄提升為中級等級:

cd /opt/microsoft/scx/bin/tools/
./scxadmin –log-set all intermediate

scxsslconfig

scxsslconfig 工具可用來在 /etc/opt/Microsoft/scx/ssl/ 中產生憑證。 此工具可用來更正下列問題:無法從 UNIX 或 Linux 主機本身判斷完整網域名稱,或 UNIX/Linux 主機已知的 FQDN 並不符合 Operations Manager 伺服器用來與主機進行連線的 FQDN。

System_CAPS_note注意事項

產生的憑證必須由 Operations Manager 簽署,才能用於 WS-Management 通訊。 若覆寫先前簽署的憑證,就必須再次簽署該憑證。

您可以使用下列命令來顯示 scxsslconfig 工具的用法:scxsslconfig -?

# /opt/microsoft/scx/bin/tools/scxsslconfig -?
Usage: /opt/microsoft/scx/bin/tools/.scxsslconfig [-v] [-s days] [-e days] [-d domain] [-h host] [-g targetpath]

-v             - toggle debug flag
-g targetpath  - generate certificates in targetpath
-s days        - days to offset valid start date with (0)
-e days        - days to offset valid end date with (3650)
-f             - force certificate to be generated even if one exists
-d domain      - domain name
-h host        - host name
-b bits        - number of key bits
-?             - this help message

範例

重新產生憑證,強制覆寫現有憑證並產生詳細資訊輸出:

cd /opt/microsoft/scx/bin/tools/
. setup.sh
/opt/microsoft/scx/bin/tools/scxsslconfig -f -v

重新產生憑證,強制覆寫現有憑證並使用指定的主機名稱和 DNS 網域名稱:

cd /opt/microsoft/scx/bin/tools/
. setup.sh
/opt/microsoft/scx/bin/tools/scxsslconfig -f –h myserver –d contoso.com

其他設定主題

SSL 加密

如有需要,您可以自訂 UNIX/Linux 代理程式使用的 SSL 加密清單。 如需此設定的詳細資訊,請參閱設定 SSL 加密主題。

Universal Linux – 作業系統名稱/版本

Universal Linux 代理程式可支援 Linux 作業系統,例如 CentOS、Debian GNU/Linux、Oracle Linux 和 Ubuntu Server;它會剖析發行檔案來判斷主機的作業系統名稱和版本。 必要時,您可以自訂這些內容。 若要針對 Universal Linux 代理程式主機自訂向 Operations Manager 顯示的作業系統內容,請使用下列程序:

在下列目錄中建立檔案 disablereleasefileupdates:/etc/opt/microsoft/scx/conf/

touch /etc/opt/microsoft/scx/conf/disablereleasefileupdates

如果此檔案存在,代理程式不會嘗試更新傳回至 Operations Manager 的作業系統內容。 如此可確保系統會保留自訂設定。

在下列目錄中編輯檔案 scx-release:/etc/opt/microsoft/scx/conf 此檔案的格式如下:

OSName=CentOS
OSVersion=6.0
OSFullName=CentOS 6.0 (x86_64)
OSAlias=UniversalR
OSManufacturer=

您可以編輯 OSNameOSVersionOSFullName 內容的值來反映自訂的值。

System_CAPS_note注意事項

不應編輯 OSAlias 內容。 此檔案中的所有內容 (除了 OSManufacturer 外) 均為強制內容,不能為 Null。