우분투 18.04 업그레이드 방법


우분투 18.04 업그레이드 방법
우분투 16.04에서 우분투 18.04 LTS 버전으로 업그레이드 하는 방법을 설명드립니다. 아직 Ubuntu 18.04 LTS Bionic Beave 버전이 배포된지 오래되지 않아 호스팅 서버등에서 직접 사용할 수 없을 경우 우분투 18.04으로 업그레이드 하여 사용하실 수 있습니다. SSH가 접속 가능한 환경에서 원격으로 업그레이드 할 수 있는 방법을 설명드립니다.

우분투 18.04를 새로 설치 하는 방법은 아래의 글을 참고해 주시기 바랍니다.

우분투 18.04 설치

패키지 업그레이드

먼저 기존에 설치된 우분투 환경의 패키지등을 최신 버전으로 업그레이드 합니다. 업그레이드는 아래의 명령어로 실행 할 수 있습니다.

$ sudo apt update 
$ sudo apt upgrade
$ sudo apt dist-upgrade

리눅스 커널이 업그레이드 될 경우 재부팅 하라는 메시지가 나타날 수 있습니다.
이 경우 재부팅하여 새로운 커널이 로드 될 수 있도록 합니다.

릴리즈 업그레이드

아래의 명령어로 업데이트 패키지를 설치하고, 릴리즈 업그레이드를 수행 하실 수 있습니다.

$ sudo apt install update-manager-core
$ sudo do-release-upgrade

만약 위의 명령어를 실행한 다음 No new release found 라는 메시지가 나타날 경우, 아래의 명령어를 실행하여 업그레이드를 하면됩니다.

$ sudo do-release-upgrade -d

릴리즈 업그레이드 명령어를 실행하면 다음과 비슷한 내용이 나타납니다.

Reading cache

Checking package manager

Continue running under SSH? 

This session appears to be running under ssh. It is not recommended 
to perform a 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]

SSH 으로 업그레이드 하는 과정에서 실패할 경우, 복구가 어렵다는 내용입니다.
만약 업그레이드를 계속 진행하게 되면 SSH 데몬이 1022 포트로 추가 동작한다는 내용으로 동의하시면 [y]를 입력 후 진행합니다.

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]

SSH 데몬이 실행돠었고, 방화벽이 동작 중이면 1022 포트를 추가적으로 오픈해야 된다는 내용을 설명합니다.
[Enter]를 입력 후 계속 진행합니다.

Checking package manager
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Calculating the changes

Calculating the changes

Do you want to start the upgrade? 


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

3 packages are going to be removed. 113 new packages are going to be 
installed. 396 packages are going to be upgraded. 

You have to download a total of 269 M. This download will take about 
2 minutes with your connection. 

Installing the upgrade can take several hours. Once the download has 
finished, the process cannot be canceled. 

 Continue [yN]  Details [d]

릴리즈 업그레이드 설명내용입니다. 업그레이드는 수 시간 소요 될 수 있으며, 다운로드가 완료되었을 경우 업그레이드를 취소 할 수 없다는 내용입니다.
내용을 확인 후 [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]를 입력 후 서버를 재부팅 하시면 우분투 18.04를 만나실 수 있으실 겁니다. 우분투 서버 버전은 그대로 사용하실 수 있지만 데스크탑 버전의 경우 환경 설정 등이 필요 할 수 있습니다. 설정과 관련된 부분은 아래의 글을 참고해 주시기 바랍니다.

우분투 설치 후 설정

( 본문 인용시 출처를 밝혀 주시면 감사하겠습니다.)