OS

2024.07.01 16:25

ubuntu 18.04 to 20.04 upgrade

  • 비아웹 오래 전 2024.07.01 16:25 인기
  • 178
    0

안녕하세요 

호스팅 전문기업 비아웹입니다.


ubuntu 18.04 lts 버전의 경우 2023년 5월 31일 EOS 되었습니다.

해당 서버를 재설치 없이 ubuntu 20.04 lts 로 upgrade 방법 기록 합니다.


해당 방법은 서버가 먼곳에 위치 하거나 재설치가 불가능한 환경에서 OS upgrade 진행하는 방법입니다.


해당 upgrade 진행시 mysql 및 php 등 추가 설치 패키지가 삭제 및 재설치가 진행됨으로, 백업이 필수이며 패키지 버전 변경으로 인한 프로그램 수정이 필요하니 추가적인 테스트 이후 실무에 적용하시기 바랍니다.


1. 테스트 환경

- ubuntu 18.04.05


2. APM 설치 

sudo apt-get install libapache2-mod-php php mysql-server


- 설치 패키지 

apache2/bionic-updates,bionic-security,now 2.4.29

php/bionic,now 1:7.2+60ubuntu1 all 

mysql-server/bionic-updates,bionic-security,now 5.7.42-0ubuntu0.18.04.1 


- phpinfo

php01.JPG

 

 3. 최신 패키지 업데이트

 sudo apt update && sudo apt upgrade && sudo apt dist-upgrade 

php02.JPG

  

4.서버 재부팅 

sudo reboot now


5. 불필요 패키지 삭제 

sudo apt autoremove && sudo apt clean

php03.JPG

  

6. 업데이트 매니저 설치 

sudo apt install update-manager-core

 sudo vi /etc/update-manager/release-upgrades

# Default behavior for the release upgrader.

  

[DEFAULT]

# Default prompting and upgrade behavior, valid options:

#

#  never  - Never check for, or allow upgrading to, a new release.

#  normal - Check to see if a new release is available.  If more than one new

#           release is found, the release upgrader will attempt to upgrade to

#           the supported release that immediately succeeds the

#           currently-running release.

#  lts    - Check to see if a new LTS release is available.  The upgrader

#           will attempt to upgrade to the first LTS release available after

#           the currently-running one.  Note that if this option is used and

#           the currently-running release is not itself an LTS release the

#           upgrader will assume prompt was meant to be normal.

Prompt=lts

~              

 php04.JPG

  

7. 업그레이드 진행 

sudo do-release-upgrade


- ssh 환경에서 업그레이드 경고 및 추가 port(1022) 안내 (ufw/iptables 사용시 1022 오픈 필요)

php05.JPG

 

- 미지원 패키지 및 업그레이드 패키지 안내

php07.JPG

 

- detail

php08.JPG


- lts 버전 선택 화면 (4.0 선택)

php09.JPG


- sshd_config 설정 변경 안내 (기존 설정 유지)

php10.JPG


- 패키지 정리 확인

php11.JPG


- upgrade 완료 및 재부팅

php12.JPG


8. OS 버전 확인

php13.JPG

 

이상과 같이 ubuntu 18.04 에서 20.04로의 업그레이드 방안에 대해 정리하였습니다.


해당 내용은 OS 재설치 없이 OS 업그레이드가 가능하다는 내용이며, 

apache / php / mysql 등 추가 패키지의 경우 버전 변경 및 삭제가 이뤄짐으로 인해 철저한 테스트 및 백업  후 실무에 적용하시기 바랍니다.


감사합니다.

호스팅 전문기업 비아웹

  • 공유링크 복사
  • 이전글ubuntu ufw 사용 방법2024.07.01
  • 다음글ubuntu 22.04 gui 원격 접속(xrdp)2024.07.01
  • 댓글목록

    등록된 댓글이 없습니다.