웹사이트 검색

CentOS 8을 CentOS 스트림으로 변환하는 방법


이 페이지에서

  1. 전제 조건
  2. 시스템 업데이트
  3. CentOS 8에서 CentOS 스트림으로 업그레이드
  4. 결론

CentOS 7을 사용 중이고 CentOS 7을 CentOS 8로 업그레이드할 계획이라면 CentOS 8 지원이 2021년 말에 종료되고 CentOS 7은 2024년까지 지원되므로 CentOS 8로 업그레이드하지 않는 것이 좋습니다.

Red Hat과 CentOS는 최근 CentOS 8이 CentOS Stream으로 전환될 것이라고 발표했습니다. 따라서 CentOS 8을 사용하는 경우 시스템을 CentOS 8에서 CentOS Stream으로 마이그레이션하는 것이 좋습니다.

이 튜토리얼에서는 CentOS 8에서 CentOS Stream으로 마이그레이션하는 방법을 보여줍니다.

전제 조건

  • CentOS 8을 실행하는 서버.\n
  • 루트 암호는 서버에서 구성됩니다.\n

시스템 업데이트

시작하기 전에 시스템을 최신 버전으로 업데이트하는 것이 좋습니다. 다음 명령을 실행하여 업데이트할 수 있습니다.

dnf update -y

시스템이 업데이트되면 시스템을 다시 시작하여 변경 사항을 적용하십시오.

reboot

시스템이 다시 시작되면 다음 명령을 사용하여 시스템 버전을 확인하십시오.

cat /etc/centos-release

다음 출력이 표시되어야 합니다.

CentOS Linux release 8.3.2011

CentOS 8에서 CentOS 스트림으로 업그레이드

먼저 시스템에 CentOS Stream 릴리스 패키지를 설치해야 합니다. 다음 명령으로 설치할 수 있습니다.

dnf install centos-release-stream -y

이렇게 하면 /etc/yum.repos.d 디렉터리에 CentOS 스트림 리포지토리가 설치됩니다.

CentOS Linux 8 - AppStream                                                                                     2.4 MB/s | 6.3 MB     00:02    
CentOS Linux 8 - BaseOS                                                                                        1.3 MB/s | 2.3 MB     00:01    
Last metadata expiration check: 0:00:01 ago on Saturday 09 January 2021 03:53:01 AM EST.
Dependencies resolved.
===============================================================================================================================================
 Package                                   Architecture               Version                                 Repository                  Size
===============================================================================================================================================
Installing:
 centos-release-stream                     x86_64                     8.1-1.1911.0.7.el8                      extras                      11 k

Transaction Summary
===============================================================================================================================================
Install  1 Package

Total download size: 11 k
Installed size: 6.6 k
Downloading Packages:
centos-release-stream-8.1-1.1911.0.7.el8.x86_64.rpm                                                            195 kB/s |  11 kB     00:00    
-----------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                          9.6 kB/s |  11 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                       1/1 
  Installing       : centos-release-stream-8.1-1.1911.0.7.el8.x86_64                                                                       1/1 
  Verifying        : centos-release-stream-8.1-1.1911.0.7.el8.x86_64                                                                       1/1 

Installed:
  centos-release-stream-8.1-1.1911.0.7.el8.x86_64                                                                                              

Complete!

다음으로 시스템에서 CentOS 8 리포지토리 파일을 제거해야 합니다. 다음 명령으로 모두 제거할 수 있습니다.

dnf swap centos-{linux,stream}-repos -y

다음과 같은 결과가 표시되어야 합니다.

Last metadata expiration check: 0:00:19 ago on Saturday 09 January 2021 03:53:29 AM EST.

Dependencies resolved.
===============================================================================================================================================
 Package                                   Architecture               Version                          Repository                         Size
===============================================================================================================================================
Installing:
 centos-stream-release                     noarch                     8.4-1.el8                        Stream-BaseOS                      21 k
     replacing  centos-linux-release.noarch 8.3-1.2011.el8
     replacing  centos-release-stream.x86_64 8.1-1.1911.0.7.el8
 centos-stream-repos                       noarch                     8-2.el8                          Stream-BaseOS                      19 k
Removing:
 centos-linux-repos                        noarch                     8-2.el8                          @BaseOS                            26 k

Transaction Summary
===============================================================================================================================================
Install  2 Packages
Remove   1 Package

Total download size: 40 k
Downloading Packages:
(1/2): centos-stream-release-8.4-1.el8.noarch.rpm                                                              116 kB/s |  21 kB     00:00    
(2/2): centos-stream-repos-8-2.el8.noarch.rpm                                                                  101 kB/s |  19 kB     00:00    
-----------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                          144 kB/s |  40 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                       1/1 
  Running scriptlet: centos-stream-repos-8-2.el8.noarch                                                                                    1/1 
  Installing       : centos-stream-repos-8-2.el8.noarch                                                                                    1/5 
  Installing       : centos-stream-release-8.4-1.el8.noarch                                                                                2/5 
  Obsoleting       : centos-release-stream-8.1-1.1911.0.7.el8.x86_64                                                                       3/5 
  Obsoleting       : centos-linux-release-8.3-1.2011.el8.noarch                                                                            4/5 
  Erasing          : centos-linux-repos-8-2.el8.noarch                                                                                     5/5 
  Running scriptlet: centos-linux-repos-8-2.el8.noarch                                                                                     5/5 
  Verifying        : centos-stream-release-8.4-1.el8.noarch                                                                                1/5 
  Verifying        : centos-linux-release-8.3-1.2011.el8.noarch                                                                            2/5 
  Verifying        : centos-release-stream-8.1-1.1911.0.7.el8.x86_64                                                                       3/5 
  Verifying        : centos-stream-repos-8-2.el8.noarch                                                                                    4/5 
  Verifying        : centos-linux-repos-8-2.el8.noarch                                                                                     5/5 

Installed:
  centos-stream-release-8.4-1.el8.noarch                                   centos-stream-repos-8-2.el8.noarch                                  

Removed:
  centos-linux-repos-8-2.el8.noarch                                                                                                            

Complete!

다음으로 모든 패키지를 최신 버전으로 동기화해야 합니다. 다음 명령으로 수행할 수 있습니다.

dnf distro-sync -y

이 명령은 모든 패키지를 동기화하는 데 약간의 시간이 걸립니다. 완료되면 시스템을 다시 시작하여 구성 변경 사항을 적용하십시오.

reboot

다음으로 다음 명령을 사용하여 시스템을 확인합니다.

cat /etc/centos-release

이제 시스템이 아래와 같이 CentOS 스트림으로 업그레이드되었습니다.

CentOS Stream release 8

다음 명령을 사용하여 리포지토리를 확인할 수도 있습니다.

ls /etc/yum.repos.d/

다음 출력이 표시되어야 합니다.

CentOS-Stream-AppStream.repo  CentOS-Stream-Debuginfo.repo  CentOS-Stream-HighAvailability.repo  CentOS-Stream-PowerTools.repo
CentOS-Stream-BaseOS.repo     CentOS-Stream-Extras.repo     CentOS-Stream-Media.repo             CentOS-Stream-RealTime.repo

결론

축하합니다! CentOS 8 시스템을 CentOS Stream으로 성공적으로 업그레이드했습니다. 궁금한 점이 있으면 언제든지 문의해 주세요.