Install the CodeDeploy agent for Ubuntu Server
We recommend installing the CodeDeploy agent with Amazon Systems Manager to be able to configure scheduled updates of the agent. For more information, see Install the CodeDeploy agent using Amazon Systems Manager.
To install the CodeDeploy agent on Ubuntu Server
-
Sign in to the instance.
-
Do one of the following, depending on the version of Ubuntu Server:
-
On Ubuntu Server 14.04, enter the following commands, one after the other:
sudo apt-get update
sudo apt-get install ruby2.0
sudo apt-get install wget
-
On Ubuntu Server 16.04 and later, enter the following commands, one after the other:
sudo apt update
sudo apt install ruby-full
sudo apt install wget
-
-
Enter the following command:
cd
/home/ubuntu
/home/ubuntu
represents the default user name for an Ubuntu Server instance. If your instance was created using a custom AMI, the AMI owner might have specified a different default user name. -
Enter the following command:
For the China (Beijing) Region:
-
wget https://aws-codedeploy-cn-north-1.s3.cn-north-1.amazonaws.com.cn/latest/install
For the China (Ningxia) Region:
-
wget https://aws-codedeploy-cn-northwest-1.s3.cn-northwest-1.amazonaws.com.cn/latest/install
-
-
Enter the following command:
chmod +x ./install
-
Do one of the following:
-
To install the latest version of the CodeDeploy agent on Ubuntu 14.04, 16.04, and 18.04:
sudo ./install auto
-
To install the latest version of the CodeDeploy agent on Ubuntu 20.04:
Note Writing the output to a temporary log file is a workaround that should be used while we address a known bug with the
install
script on Ubuntu 20.04.sudo ./install auto > /tmp/logfile
-
To install a specific version of the CodeDeploy agent on Ubuntu 14.04, 16.04, and 18.04:
sudo ./install auto -v releases/codedeploy-agent-
###
.deb -
To install a specific version of the CodeDeploy agent on Ubuntu 20.04:
Note Writing the output to a temporary log file is a workaround that should be used while we address a known bug with the
install
script on Ubuntu 20.04.sudo ./install auto -v releases/codedeploy-agent-
###
.deb > /tmp/logfile
-
To check that the service is running
-
Enter the following command:
sudo service codedeploy-agent status
If the CodeDeploy agent is installed and running, you should see a message like
The AWS CodeDeploy agent is running
. -
If you see a message like
error: No AWS CodeDeploy agent running
, start the service and run the following two commands, one at a time:sudo service codedeploy-agent start
sudo service codedeploy-agent status