EC2 Linux 인스턴스의 Ubuntu를 한 LTS 버전에서 다른 LTS 버전으로 업그레이드하려면 어떻게 해야 합니까?

3분 분량
0

Amazon Elastic Compute Cloud(Amazon EC2) 인스턴스에서 장기 지원(LTS) Ubuntu 버전을 업그레이드하려고 합니다.

해결 방법

LTS Ubuntu 버전은 다음 버전으로만 순차적으로 업그레이드할 수 있습니다. 예를 들어 LTS Ubuntu 버전 18.04에서 버전 24.04로 업그레이드하려면 먼저 버전 20.04로 업그레이드해야 합니다. 그런 다음, 22.04로 업그레이드하고 마지막으로 24.04로 업그레이드합니다.

전제 조건: Ubuntu 웹사이트에서 사전 업그레이드 체크리스트를 검토하십시오. 또한 데이터 백업을 생성하십시오.

시스템 업데이트

다음 단계를 완료하십시오.

  1. 운영 체제(OS) 버전을 확인하려면 lsb_release 명령을 실행합니다.

    lsb_release -a

    출력 예:

    No LSB modules are available.
    Distributor ID:    Ubuntu
    Description:    Ubuntu 20.04.6 LTS
    Release:    20.04
    Codename:    focal
  2. 기존 LTS Ubuntu 버전에 사용 가능한 모든 업데이트를 설치하려면 다음 명령을 실행합니다.

    sudo apt update
    sudo apt upgrade
  3. 서버를 재부팅합니다.
    참고: 또한 최신 커널을 실행 중인지 확인하려면 업데이트를 설치한 후 인스턴스를 재부팅하는 것이 좋습니다.

LTS Ubuntu 버전 업그레이드

다음 단계를 완료하십시오.

  1. Ubuntu 버전을 업그레이드하려면 do-release-upgrade Ubuntu 명령을 실행합니다.

    sudo do-release-upgrade
  2. 받은 요약에서 업그레이드를 검토한 다음, Y를 누릅니다.
    업그레이드 요약 예:

    Do you want to start the upgrade?
    
    3 packages are going to be removed. 90 new packages are going to be
    installed. 567 packages are going to be upgraded.
    
    You have to download a total of 356 M. This download will take about
    1 minute with your connection.
    
    Installing the upgrade can take several hours. Once the download has
    finished, the process cannot be canceled.
    
     Continue [yN]  Details [d]
  3. 기존 버전에 업그레이드 시 덮어쓸 수 있는 사용자 지정 구성이 있는 경우 유틸리티에서 변경 사항을 확인하라는 메시지를 표시합니다. 패키지 관리자 버전(package maintainer's version)을 설치하려면 Y를 누르십시오. 기존 버전을 유지하려면 N을 누르십시오. /boot/grub/menu.lst와 같은 일부 시나리오에서는 패키지 관리자 버전을 설치해야 합니다.
    프롬프트 예:

    Configuration file '/etc/ssh/ssh_config' ==> Modified (by you or by a script) since installation.
     ==> Package distributor has shipped an updated version.
       What would you like to do about it ?  Your options are:
        Y or I  : install the package maintainer's version
        N or O  : keep your currently-installed version
          D     : show the differences between the versions
          Z     : start a shell to examine the situation
     The default action is to keep your current version.
    *** ssh_config (Y/I/N/O/D/Z) [default=N] ?
  4. 더 이상 사용되지 않는 패키지를 제거하려면 다음 프롬프트에서 Y를 누릅니다.

    Searching for obsolete softwareReading state information... Done
    
    Remove obsolete packages?
    
    73 packages are going to be removed.
    Continue [yN]  Details [d]
  5. 시스템을 재부팅하려면 다음 프롬프트에서 Y를 누릅니다.

    System upgrade is complete.
    Restart required
    
    To finish the upgrade, a restart is required.
    If you select 'y' the system will be restarted.
    
    Continue [yN]

    참고: 업그레이드를 완료하려면 인스턴스를 재부팅해야 합니다.

  6. Ubuntu 버전을 확인하려면 lsb_release 명령을 실행합니다.

    lsb_release -a

    출력 예:

    No LSB modules are available.
    Distributor ID:    Ubuntu
    Description:    Ubuntu 24.04 LTS
    Release:    24.04
    Codename:    focal
AWS 공식
AWS 공식업데이트됨 2달 전