SW/리눅스

Ubuntu 16.04 에서 18.04로 업그레이드 하는 방법, 예제, 명령어

얇은생각 2020. 10. 7. 07:30
반응형

Ubuntu 16.04 에서 18.04로 업그레이드 하는 방법, 예제, 명령어

 

최신 Ubuntu LTS 릴리즈인 Ubuntu 18.04(바이오닉 비버) 2018 4 26일 출시되었으며, 2023 4월까지 5년간 지원될 예정입니다. 이 튜토리얼에서는 Ubuntu 16.04 이상 설치를 Ubuntu 18.04(Bionic Beaver)로 업그레이드하는 방법에 대해 설명합니다.

 

 

 

필수 구성 요소 

튜토리얼로 시작하기 전에 sudo 권한을 가진 사용자로 로그인했는지 확인합니다.

 

 

 

데이터 백업

무엇보다도 먼저 운영 체제의 주요 업그레이드를 시작하기 전에 데이터를 백업해야 합니다. 가상 시스템에서 Ubuntu를 실행하는 경우 전체 시스템 스냅샷을 생성하는 것이 가장 좋습니다. 업데이트가 중단될 경우 시스템을 쉽게 복원할 수 있습니다.

 

 

 

현재 설치된 패키지 업데이트 

릴리스 업그레이드를 시작하기 전에 현재 설치된 모든 패키지를 최신 버전으로 업데이트하는 것이 좋습니다.

sudo apt update
sudo apt upgrade

 

  

또한 설치된 패키지의 주요 버전 업그레이드를 수행하고 불필요한 패키지를 제거할 수 있는 dist-upgrade도 실행합니다.

sudo apt dist-upgrade

 

 

 

Ubuntu 16.04 Ubuntu 18.04로 업그레이드 

Ubuntu do-release-upgrade라는 도구를 제공하여 업그레이드를 매우 간단한 프로세스로 만듭니다.

도구는 시스템에 이미 설치되어 있어야 하지만 어떤 이유로 설치되지 않은 경우 다음을 사용하여 설치할 수 있습니다.

sudo apt install update-manager-core

 

 

업그레이드를 시작하려면 do-release-upgrade를 실행합니다.

sudo do-release-upgrade

 

 

SSH를 통해 시스템을 업그레이드하는 경우 계속할지 여부를 묻는 메시지가 표시됩니다.

Reading cache

Checking package manager

Continue running under SSH?

This session appears to be running under ssh. It is not recommended
to perform an upgrade over ssh currently because in case of failure it
is harder to recover.

If you continue, an additional ssh daemon will be started at port
'1022'.
Do you want to continue?

Continue [yN]

 

Starting additional sshd

To make recovery in case of failure easier, an additional sshd will
be started on port '1022'. If anything goes wrong with the running
ssh you can still connect to the additional one.
If you run a firewall, you may need to temporarily open this port. As
this is potentially dangerous it's not done automatically. You can
open the port with e.g.:
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'

To continue please press [ENTER]

 

 

 

업그레이드 도구가 패키지 목록을 다운로드하고 변경 사항을 계산하면 계속할지 여부를 묻는 메시지가 표시됩니다.

Do you want to start the upgrade?

4 installed packages are no longer supported by Canonical. You can
still get support from the community.

3 packages are going to be removed. 90 new packages are going to be
installed. 397 packages are going to be upgraded.

You have to download a total of 267 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.

 

 

다시 y를 입력하면 업그레이드 프로세스가 시작됩니다.

업그레이드 프로세스 중에 기존 구성 파일을 유지할지 아니면 패키지 유지 관리자의 버전을 설치할지 등의 다양한 질문이 표시됩니다. 파일을 사용자 지정하지 않은 경우 현재 구성을 유지하려면 Y를 입력해도 안전합니다.

Configuration file '/etc/sysctl.conf'
 ==> 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.
*** sysctl.conf (Y/I/N/O/D/Z) [default=N] ?

 

  

업그레이드 프로세스는 업데이트 수와 인터넷 속도에 따라 다소 시간이 걸릴 수 있습니다. 

새 패키지가 설치되면 업데이트 도구는 구식 소프트웨어를 제거할지 묻는 메시지를 표시합니다. d를 입력하고 구식 패키지 목록을 확인할 수 없는 경우 대부분의 경우 y를 입력하고 구식 패키지를 모두 제거하는 것이 안전합니다. 

Searching for obsolete software
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done

Remove obsolete packages?


17 packages are going to be removed.

 

 

업그레이드 프로세스가 완료되면 모든 작업이 정상적으로 진행되었다고 가정하면 컴퓨터를 재부팅하라는 메시지가 표시됩니다. 계속하려면 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] y

 

 

 

업데이트 확인

서버가 재부팅될 때까지 잠시 기다렸다가 다시 연결합니다. 로그인하면 다음 메시지가 표시됩니다.

Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.15.0-20-generic x86_64)

 

  

Ubuntu 18.04 LTS(GNU/리눅스 4.15.0-20-generic x86_64)에 오신 것을 환영합니다.

lsb_release -a

 

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04 LTS
Release:    18.04
Codename:   bionic

 

 

이제 새로운 Ubuntu 18.04 LTS(바이오닉 비버)를 즐기실 수 있습니다.

반응형