AWS RHEL8 CloudWatch Agentをインストールする

環境
AWS EC2
RHEL 8.4

操作方法
1.OSバージョン確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.4 (Ootpa)
$ cat /etc/redhat-release Red Hat Enterprise Linux release 8.4 (Ootpa)
$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.4 (Ootpa)

2.CloudWatch Agentがインストールされていないことを確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# cd /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d
-bash: cd: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d: No such file or directory
# cd /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d -bash: cd: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d: No such file or directory
# cd /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d
-bash: cd: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d: No such file or directory

3.CloudWatch Agentをインストールします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$ sudo dnf install https://s3.ap-northeast-1.amazonaws.com/amazoncloudwatch-agent-ap-northeast-1/redhat/amd64/latest/amazon-cloudwatch-agent.rpm
$ sudo dnf install https://s3.ap-northeast-1.amazonaws.com/amazoncloudwatch-agent-ap-northeast-1/redhat/amd64/latest/amazon-cloudwatch-agent.rpm
$ sudo dnf install https://s3.ap-northeast-1.amazonaws.com/amazoncloudwatch-agent-ap-northeast-1/redhat/amd64/latest/amazon-cloudwatch-agent.rpm

4.CloudWatch Agent がインストールされたことを確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# cd /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d
# ls
#
# dnf info amazon-cloudwatch-agent
# cd /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d # ls # # dnf info amazon-cloudwatch-agent
# cd /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d
# ls
#
# dnf info amazon-cloudwatch-agent

 

AWS

Posted by arkgame