What is the equivalent of 'sudo yum install -y awslogs' for apt-get?
According to aws documentation, this is the command to install the aws-log agent:
sudo yum install -y awslogs
However since I am using ubuntu, I have to use apt-get
. But the aws-log
package is not available.
Is there an equivalent of the aws-log
for ubuntu? If not, how can I install it?
Please read http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/QuickStartEC2Instance.html for installation instruction for ubuntu/debian:
Get installer with
curl https://s3.amazonaws.com//aws-cloudwatch/downloads/latest/awslogs-agent-setup.py -O
and run the installer
sudo python ./awslogs-agent-setup.py --region us-east-1
After you have installed the agent, proceed to the next section to configure the agent.
The CloudWatch Logs agent awslogs
RPM package is only available on Amazon Linux. If you have Ubuntu Server, CentOS, or Red Hat, you'll need to manually install it.
You need to have Python installed and apt-get update
is recommended before installing the CloudWatch Logs agent. You have two options.
-
Run directly from the internet:
curl https://s3.amazonaws.com//aws-cloudwatch/downloads/latest/awslogs-agent-setup.py -O sudo python ./awslogs-agent-setup.py --region us-east-1
-
Install standalone:
curl https://s3.amazonaws.com//aws-cloudwatch/downloads/latest/awslogs-agent-setup.py -O curl https://s3.amazonaws.com//aws-cloudwatch/downloads/latest/AgentDependencies.tar.gz -O tar xvf AgentDependencies.tar.gz -C /tmp/ sudo python ./awslogs-agent-setup.py --region us-east-1 --dependency-path /tmp/AgentDependencies
With both options the --region
can be us-east-1
, us-west-1
, us-west-2
, ap-south-1
, ap-northeast-2
, ap-southeast-1
, ap-southeast-2
, ap-northeast-1
, eu-central-1
, eu-west-1
, or sa-east-1
. For details, see Install and Configure the CloudWatch Logs Agent on a Running EC2 Instance.