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

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

检查 SSM 代理状态并启动代理

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

操作系统 用于检查 SSM 代理状态的命令 启动 SSM 代理的命令
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 服务器 8、9 和 10

sudo systemctl status amazon-ssm-agent

sudo systemctl enable amazon-ssm-agent

sudo systemctl start amazon-ssm-agent

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 Services(全部)和 16.04(32 位)

sudo status amazon-ssm-agent

sudo start amazon-ssm-agent

Ubuntu 服务器 16.04 64 位实例(Deb 软件包安装)

sudo systemctl status amazon-ssm-agent

sudo systemctl enable amazon-ssm-agent

sudo systemctl start amazon-ssm-agent

Ubuntu 服务器 16.04、18.04 和 20.04 LTS 和 20.10 STR 64 位服务器(快照软件包安装)

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