Amazon Linux 2 는 2023년까지 지원되는 LTS 버전이며 systemd 를 지원하며 extra 저장소를 통한 빠른 패키지 업데이트를 제공하므로 새로운 인스턴스는 2를 사용하는게 좋습니다.

기존에 Version 1 AMI 를 사용하고 있다면 2로 손쉽게 이전할 수 있는 방법이 없으며 그나마 다음 절차로 이전하는 게 쉽습니다.

  1. 기존 instance 종료
  2. 버전 2 새로운 Instance 생성
  3. EBS 를 새로운 Instance 에 attach
  4. 기존 데이타와 설정 이관


AWS 에서는 아무 도움이 안 되는 업그레이드 확인 패키지를 제공하므로 현재 사용중인 package 중에 version 2 Instance 에서 문제될만한 패키지 정도는 확인해 볼 수 있습니다.

업그레이드 확인 패키지

다음 패키지를 설치합니다.

$ sudo yum install -y preupgrade-assistant preupgrade-assistant-al1toal2
BASH


사전 업그레이드 프로그램을 실행하면 처리 여부를 확인한 후에 업그레이드에 필요한 파일을 반영합니다.

$ sudo preupg

The Preupgrade Assistant is a diagnostics tool 
and does not perform the actual upgrade.
Do you want to continue? [Y/n]
     
Gathering logs used by the Preupgrade Assistant:
All installed packages                                 : 01/10 ...finished (time 00:00s)
All changed files                                      : 02/10 ...finished (time 00:54s)
Changed config files                                   : 03/10 ...finished (time 00:00s)
All users                                              : 04/10 ...finished (time 00:00s)
All groups                                             : 05/10 ...finished (time 00:00s)
Service statuses                                       : 06/10 ...finished (time 00:00s)
All installed files                                    : 07/10 ...finished (time 00:01s)
All local files                                        : 08/10 ...running
BASH


변경에 관한 리포트는 /root/preupgrade 폴더내에 만들어지며 웹 브라우저로 볼수 있습니다.


같이 보기

Ref