Oracle Linux 6 to 7 업그레이드

Share

Last Updated on 9월 15, 2021 by Jade(정현호)


안녕하세요
이번 포스팅은 Oracle Linux 6.8 에서 Oracle Linux7.8 로 업그레이드를 진행 내역 입니다. 


7.6으로 바로 업그레이드 가능하며 아래와 같이 몇가지 제한 사항이나 필요 사항은 있습니다.

The Oracle Linux 6 system has been completely updated from the ol6_x86_64_latest channel or ol6_latest repository.

UEK R3 or UEK R4 has been installed on the system to be upgraded and is the default boot kernel.

Upgrading from UEK R2 is not supported. Note that the system is upgraded to use the UEK R5 release provided with Oracle Linux 7 Update 6.

No Oracle product stack is present on the system.

그래서 ol6_x86_64_latest 과 ol6_x86_64_addons yum repository가 연결이 되어있어야 합니다.
      

yum repository 등록 및 패키지 다운로드

Public Repository 파일 다운로드
(있다면 수정/갱신)

[root]# cd /etc/yum.repos.d
[root]# mv public-yum-ol6.repo public-yum-ol6.repo.old
     => 파일 rename

[root]# wget http://yum.oracle.com/public-yum-ol6.repo
     => 파일 다운로드


다운로드 받은 Repository 파일를 수정 합니다.

[root]# vi public-yum-ol6.repo

[ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1

enabled=0 -> 1 로 변경

[root]# yum clean all


패키지 최신 업데이트 수행


[root]# yum -y update

[root]# reboot


필요 upgrade packages 설치

[root]# yum -y install openscap redhat-upgrade-tool \
preupgrade-assistant preupgrade-assistant-el6toel7 \
preupgrade-assistant-el6toel7-data-0 \

preupgrade-assistant-tools preupgrade-assistant-ui


Preupgrade Assistant (preupg)

Preupgrade Assistant (preupg)는 사용 중인 시스템을 업그레이드 하기 전, Linux 6에서 Linux 7로 업그레이드 시 발생할 수 있는 문제를 분석해 주는 유틸리티로, 업그레이드 실행 전 꼭 수행해서 내용을 확인 해야 합니다.


[root]# preupg

The Preupgrade Assistant is a diagnostics tool
and does not perform the actual upgrade.
Do you want to continue? [Y/n]
Y <- 입력


case the upgrade fails and full re-install of the system

from installation media is needed.
Upload results to UI by the command:
e.g. preupg -u http://example.com:8099/submit/ -r /root/preupgrade-results/preupg_results-201004031410.tar.gz .
결과는 생성된 "preupg_results-201004031410.tar.gz" 을 통해 확인 합니다.


업그레이드 실행

7.6 버전으로 업그레이드 해야 하며, 업그레이드 이후 yum update 하여 7.8까지 버전업을 합니다.


[root]# wget http://yum.oracle.com/ISOS/OracleLinux/OL7/u6/x86_64/OracleLinux-R7-U6-Server-x86_64-dvd.iso


[root]# /usr/bin/redhat-upgrade-tool-cli --iso OracleLinux-R7-U6-Server-x86_64-dvd.iso \
--debuglog=/tmp/upgrade.log --cleanup-post

preupg.risk.SLIGHT: Enabled repository files for the Kickstart generation are stored in the /root/preupgrade/kickstart/available-repos file.

preupg.risk.SLIGHT: Some packages installed on the system changed their names between Oracle Linux 6 and Oracle Linux 7. Although they should be compatible, monitor them after the update.
Continue with the upgrade [Y/N]? Y <-- 입력


Determining IP information for net0... done.

[ OK ]
Bringing up interface net1:
Determining IP information for net1... done.
[ OK ]
Finished. Reboot to start upgrade.



완료 되었다면 위와 같이 reboot 메세지를 확인 할수 있으며, reboot 을 수행하여 나머지 upgrade를 진행합니다.

업그레이드 완료 후 부팅이 완료 되면 다시 모든 패키지를 업데이트를 하고 다시 재부팅을 합니다.

[root]# yum -y update

[root]# reboot

모든 패키지를 업데이트 완료 후 재부팅을 하게 되면 7.8버전까지 업데이트 됩니다



EPEL 6 버전 패키지 삭제

업그레이드 완료 이후 패키지 업데이트 수행시 아래와 같은 에러 발생시 6버전에서 설치 하였던 epel6 패키지 삭제합니다.

Transaction check error:

file /etc/rpm/macros.ghc-srpm from install of redhat-rpm-config-9.1.0-88.0.1.el7.noarch conflicts with file from package epel-release-6-8.noarch


패키지는 아래와 같이 삭제를 합니다.

[root]# yum -y remove epel-release.noarch


Oracle Linux7에 EPEL Repository 등록

Oracle Linux7에 EPEL repository를 다시 설치 하도록 하겠습니다
 * libnghttp2 libnghttp2-devel 패키지 및 remi-php repository 설치시 필요합니다.



[root]# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

[root]# rpm -ivh epel-release-latest-7.noarch.rpm



[추가] ol7_optional_latest reposotory 활성화

/etc/yum.repos.d 디렉토리 내에 oracle linux7 파일에서 ol7_optional_latest를 활성화 합니다.
파일은 public-yum-ol7.repo 나 oracle-linux-ol7.repo 입니다.

[ol7_optional_latest]
name=Oracle Linux $releasever Optional Latest ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/optional/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

enabled=0 ==> 1 로 변경



0
글에 대한 당신의 생각을 기다립니다. 댓글 의견 주세요!x