

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# Ubuntu Server용 CodeDeploy 에이전트 설치
<a name="codedeploy-agent-operations-install-ubuntu"></a>

**Ubuntu Server에 CodeDeploy 에이전트를 설치하려면**

1. 인스턴스에 로그인합니다.

1. 다음 명령을 차례로 입력합니다.

   ```
   sudo apt update
   ```

   버전 2.0.x 이상의 경우:

   ```
   sudo apt install wget
   ```

   버전 1.8.x 이하의 경우:

   ```
   sudo apt install ruby-full wget
   ```

1. 다음 명령을 입력합니다.

   ```
   cd {{/home/ubuntu}}
   ```

   {{/home/Ubuntu}}는 Ubuntu Server 인스턴스의 기본 사용자 이름을 나타냅니다. 사용자 지정 AMI를 사용하여 인스턴스를 만든 경우 AMI 소유자가 다른 기본 사용자 이름을 지정했을 수 있습니다.

1. 다음 명령을 입력합니다. `latestv2/` 접두사는 버전 2.0.x 설치 관리자를 제공하고 `latest/` 접두사는 버전 1.8.x 설치 관리자를 제공합니다.

   버전 2.0.x 이상의 경우:

   ```
   wget https://{{bucket-name}}.s3.{{region-identifier}}.amazonaws.com/latestv2/install
   ```

   버전 1.8.x 이하의 경우:

   ```
   wget https://{{bucket-name}}.s3.{{region-identifier}}.amazonaws.com/latest/install
   ```

   {{bucket-name}}은 해당 리전의 CodeDeploy 리소스 키트 파일이 포함되어 있는 Amazon S3 버킷의 이름이며, {{region-identifier}}는 리전의 식별자입니다.

   예를 들어 버전 2.0.x 이상의 경우:

   `https://aws-codedeploy-us-east-2.s3.us-east-2.amazonaws.com/latestv2/install`

   버전 1.8.x 이하의 경우:

   `https://aws-codedeploy-us-east-2.s3.us-east-2.amazonaws.com/latest/install`

   버킷 이름 및 리전 식별자 목록은 [리전별 리소스 키트 버킷 이름](resource-kit.md#resource-kit-bucket-names) 단원을 참조하세요.

1. 다음 명령을 입력합니다.

   ```
   chmod +x ./install
   ```

1. 다음 중 하나를 수행하세요.
   + 최신 버전의 CodeDeploy 에이전트를 설치하려면 다음을 수행합니다.

     ```
     sudo ./install auto
     ```
   + 특정 버전의 CodeDeploy 에이전트를 설치하려면 다음을 수행합니다.
     + 해당 리전에서 사용 가능한 버전을 나열합니다.

       ```
       aws s3 ls s3://aws-codedeploy-{{region-identifier}}/releases/ --region {{region-identifier}} | grep '\.deb$'
       ```
     + 다음 버전 중 하나를 설치합니다.

       버전 2.0.x 이상의 경우 패키지는 아키텍처별로 다릅니다.

       ```
       sudo ./install auto -v releases/codedeploy-agent_{{version}}_{{arch}}.deb
       ```

       여기서 {{arch}}는 인스턴스 아키텍처에 `arm64` 따라 `amd64` 또는 입니다.

       버전 1.8.x 이하의 경우 패키지는 다른 명명 규칙을 사용합니다.

       ```
       sudo ./install auto -v releases/codedeploy-agent_{{version}}_all.deb
       ```

       최신 릴리스 버전은 섹션을 참조하세요[CodeDeploy 에이전트의 버전 기록](codedeploy-agent.md#codedeploy-agent-version-history).

**서비스가 실행 중인지 확인하려면**

1. 다음 명령을 입력합니다.

   ```
   systemctl status codedeploy-agent
   ```

   CodeDeploy 에이전트가 설치되어 실행 중인 경우:

   버전 2.0.x 이상의 경우 다음이 표시됩니다. `The AWS CodeDeploy agent is running.` 

   버전 1.8.x 이하의 경우 다음이 표시되어야 합니다. `The AWS CodeDeploy agent is running.` 

1. 에이전트가 실행되지 않는 경우 서비스를 시작하고 상태를 확인합니다.

   ```
   systemctl start codedeploy-agent
   ```

   ```
   systemctl status codedeploy-agent
   ```