正在检查 SSM Agent 状态并启动代理 - Amazon Systems Manager
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 Amazon Web Services 服务入门

正在检查 SSM Agent 状态并启动代理

本主题列出了用于检查 Amazon Systems Manager Agent (SSM Agent) 是否正在每个受支持的操作系统上运行的命令。它还提供了用于启动代理(如果未在运行)的命令。

操作系统 用于检查 SSM Agent 状态的命令 用于启动 SSM Agent 的命令
Amazon Linux

sudo status amazon-ssm-agent

sudo start amazon-ssm-agent

Amazon Linux 2

sudo systemctl status amazon-ssm-agent

sudo systemctl enable amazon-ssm-agent

sudo systemctl start amazon-ssm-agent

CentOS 6.x

sudo status amazon-ssm-agent

sudo start amazon-ssm-agent

CentOS 7.x 和 CentOS 8.x

sudo systemctl status amazon-ssm-agent

sudo systemctl enable amazon-ssm-agent

sudo systemctl start amazon-ssm-agent

Debian Server 8、9 和 10

sudo systemctl status amazon-ssm-agent

sudo systemctl enable amazon-ssm-agent

sudo systemctl start amazon-ssm-agent

macOS 检查位于 /var/log/amazon/ssm/amazon-ssm-agent.log 中的代理日志文件

sudo launchctl load -w /Library/LaunchDaemons/com.amazon.aws.ssm.plist

sudo launchctl start com.amazon.aws.ssm

Oracle Linux

sudo systemctl status amazon-ssm-agent

sudo systemctl enable amazon-ssm-agent

sudo systemctl start amazon-ssm-agent

Red Hat Enterprise Linux(RHEL) 6.x

sudo status amazon-ssm-agent

sudo start amazon-ssm-agent

Red Hat Enterprise Linux (RHEL) 7.x 和 8.x

sudo systemctl status amazon-ssm-agent

sudo systemctl enable amazon-ssm-agent

sudo systemctl start amazon-ssm-agent

SUSE Linux Enterprise Server (SLES)

sudo systemctl status amazon-ssm-agent

sudo systemctl enable amazon-ssm-agent

sudo systemctl start amazon-ssm-agent

Ubuntu Server 14.04(全部)和 16.04(32 位)

sudo status amazon-ssm-agent

sudo start amazon-ssm-agent

Ubuntu Server 16.04 64 位实例(Deb 程序包安装)

sudo systemctl status amazon-ssm-agent

sudo systemctl enable amazon-ssm-agent

sudo systemctl start amazon-ssm-agent

Ubuntu Server 16.04、18.04 和 20.04 LTS 以及 20.10 STR 64 位(Snap 软件包安装)

sudo systemctl status snap.amazon-ssm-agent.amazon-ssm-agent.service

sudo snap start amazon-ssm-agent

Windows Server

在 PowerShell 中运行:

Get-Service AmazonSSMAgent

在 PowerShell 管理员模式下运行:

Start-Service AmazonSSMAgent