管理和配置 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 不匹配。
![]() |
---|
生成的证书必须由 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 密码主题。
通用 Linux - 操作系统名称/版本
通用 Linux 代理支持多种 Linux 操作系统(例如 CentOS、Debian GNU/Linux、Oracle Linux 和 Ubuntu 服务器),它分析版本文件,以确定主机的操作系统名称和版本。 如果需要,可以自定义这些属性。 若要为通用 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=
可以编辑 OSName、OSVersion 和 OSFullName 属性的值,以反映自定义的值。
![]() |
---|
不应编辑 OSAlias 属性。 此文件中除 OSManufacturer 外的所有属性都是强制的,不应为 null。 |