

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

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

Windows Server 인스턴스에서 다음 방법 중 하나를 사용하여 CodeDeploy 에이전트를 다운로드하고 설치할 수 있습니다.
+ 사용 AWS Systems Manager (권장)
+ 일련의 Windows PowerShell 명령 실행
+ 직접 다운로드 링크 선택
+ Amazon S3 복사 명령을 실행합니다.

**참고**  
CodeDeploy 에이전트가 설치된 폴더는 `C:\Program Data\Amazon\CodeDeploy`입니다. 이 경로에 디렉터리 교차점 또는 심볼릭 링크가 없는 것을 확인해야 합니다.

**Topics**
+ [Systems Manager 사용](#codedeploy-agent-operations-install-system-manager)
+ [Windows PowerShell 사용](#codedeploy-agent-operations-install-windows-powershell)
+ [직접 링크 사용](#codedeploy-agent-operations-install-windows-direct-link)
+ [Amazon S3 복사 명령 사용](#codedeploy-agent-operations-install-windows-s3-copy)

## Systems Manager 사용
<a name="codedeploy-agent-operations-install-system-manager"></a>

CodeDeploy 에이전트를 설치하려면 [를 사용하여 CodeDeploy 에이전트 설치 AWS Systems Manager](codedeploy-agent-operations-install-ssm.md)의 지침을 따릅니다.

## Windows PowerShell 사용
<a name="codedeploy-agent-operations-install-windows-powershell"></a>

인스턴스에 로그인하여 Windows PowerShell에서 다음 명령을 실행합니다.

1.  인터넷에서 다운로드한 모든 스크립트와 구성 파일에 신뢰할 수 있는 게시자의 서명이 있어야 합니다. 실행 정책을 변경하라는 메시지가 나타나면 "**Y**"를 입력합니다.

   ```
    Set-ExecutionPolicy RemoteSigned
   ```

1.  를 로드합니다 AWS Tools for Windows PowerShell.

   ```
   Import-Module AWSPowerShell
   ```

1.  CodeDeploy 에이전트 설치 파일이 다운로드될 디렉터리를 생성합니다.

   ```
   New-Item -Path "c:\temp" -ItemType "directory" -Force
   ```

1. `Set-AWSCredential` 및 `Initialize-AWSDefaultConfiguration` 명령을 사용하여 AWS 자격 증명을 구성합니다. 자세한 내용은 *AWS Tools for PowerShell 사용 설명서*의 [AWS 자격 증명 사용](https://docs.aws.amazon.com/powershell/latest/userguide/specifying-your-aws-credentials.html)을 참조하세요.

1.  CodeDeploy 에이전트 설치 파일을 다운로드합니다.
**참고**  
AWS 는 CodeDeploy 에이전트의 최신 마이너 버전을 지원합니다. 현재 최신 마이너 버전은 1.7.x입니다.

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

     ```
     powershell.exe -Command Read-S3Object -BucketName bucket-name -Key latest/codedeploy-agent.msi -File c:\temp\codedeploy-agent.msi
     ```

   특정 버전의 CodeDeploy 에이전트를 설치하려면
   + 

     ```
     powershell.exe -Command Read-S3Object -BucketName bucket-name -Key releases/codedeploy-agent-###.msi -File c:\temp\codedeploy-agent.msi
     ```

   *bucket-name*은 해당 리전의 CodeDeploy 리소스 키트 파일이 포함되어 있는 Amazon S3 버킷의 이름입니다. 예를 들어 미국 동부(오하이오) 리전의 경우 *bucket-name*을 `aws-codedeploy-us-east-2`로 바꿉니다. 버킷 이름 목록은 [리전별 리소스 키트 버킷 이름](resource-kit.md#resource-kit-bucket-names) 단원을 참조하세요.

1.  CodeDeploy 에이전트 설치 파일을 실행합니다.

   ```
   c:\temp\codedeploy-agent.msi /quiet /l c:\temp\host-agent-install-log.txt
   ```

서비스가 실행 중인지 확인하려면 다음 명령을 실행합니다.

```
powershell.exe -Command Get-Service -Name codedeployagent
```

 CodeDeploy 에이전트를 방금 설치했고 아직 시작하지 않은 경우 **Get-Service** 명령을 실행한 후 **상태**에 **Start...**이 표시되어야 합니다.

```
Status     Name                DisplayName
------     ----                -----------
Start...   codedeployagent    CodeDeploy Host Agent Service
```

CodeDeploy 에이전트가 이미 실행 중인 경우 **Get-Service** 명령을 실행한 후 **상태**에 **Running**이 표시되어야 합니다.

```
Status     Name                DisplayName
------     ----                -----------
Running    codedeployagent    CodeDeploy Host Agent Service
```

## 직접 링크 사용
<a name="codedeploy-agent-operations-install-windows-direct-link"></a>

Windows Server 인스턴스의 브라우저 보안 설정이 `https://s3.*.amazonaws.com` 등에 권한을 제공하는 경우, 리전의 직접 링크를 사용하여 CodeDeploy 에이전트를 다운로드한 후 설치 관리자를 수동으로 실행할 수 있습니다.

링크는 다음과 같습니다.

```
https://s3.region.amazonaws.com/aws-codedeploy-region/latest/codedeploy-agent.msi
```

여기서 *리전*은 애플리케이션을 배포하는 AWS 리전입니다.

예제:

```
https://s3.af-south-1.amazonaws.com/aws-codedeploy-af-south-1/latest/codedeploy-agent.msi
```

**중요**  
CodeDeploy 애플리케이션과 같은 리전에 있는 `.msi` 파일을 가져옵니다. 다른 리전을 선택하면 `.msi` 파일을 실행할 때 `codedeploy-agent-log` 파일에 `inconsistent region` 오류가 발생할 수 있습니다.

## Amazon S3 복사 명령 사용
<a name="codedeploy-agent-operations-install-windows-s3-copy"></a>

 AWS CLI 가 인스턴스에 설치된 경우 Amazon S3 [cp](https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html) 명령을 사용하여 CodeDeploy 에이전트를 다운로드한 다음 설치 관리자를 수동으로 실행할 수 있습니다. 자세한 내용은 [Microsoft Windows AWS Command Line Interface 에 설치를](https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html) 참조하세요.

Amazon S3 명령은 다음과 같습니다.

```
aws s3 cp s3://aws-codedeploy-region/latest/codedeploy-agent.msi codedeploy-agent.msi --region region
```

여기서 *리전*은 애플리케이션을 배포하는 AWS 리전입니다.

예제:

```
aws s3 cp s3://aws-codedeploy-af-south-1/latest/codedeploy-agent.msi codedeploy-agent.msi --region af-south-1
```