How to Upgrade from RHEL 7 to RHEL 8

13/02/2020
Long waited Red Hat Enterprise Linux 8 (RHEL 8) was released recently. One of the ways of getting RHEL 8 is to download RHEL 8 installation media (ISO image) and install it fresh on your workstation or server. But, if you already have a RHEL 7 system up and running, doing a reinstallation of the operation system may be a lot of work. Luckily, you can upgrade your existing RHEL 7 operating system to RHEL 8. Red Hat calls it an in place upgrade.

In this article, I am going to show you how to upgrade your existing RHEL 7 system to RHEL 8. So, let’s get started.

Requirements:

In order to do an in place upgrade on your RHEL 7 system, you must meet the following requirements:

  • You must start the upgrade from RHEL 7.6. If you have an older version of RHEL 7 installed, then you must upgrade it to RHEL 7.6 first. Then, you can upgrade to RHEL 8.
  • You can only upgrade RHEL 7 server version.
  • You must be using RHEL 7 64-bit version.
  • You must have at least 100 MB of free space available for /boot if you have /boot directory as a separate partition.
  • You must have FIPS disabled on your RHEL 7 if you’ve enabled it. By default, it is not enabled.

NOTE: Before you attempt to upgrade your operating system from RHEL 7 to RHEL 8, it’s always a good idea to backup all your important data from the server. Anything can go wrong and you may end up losing your precious data. You should not take any risks.

Upgrading to RHEL 7.6:

First, make sure that the Red Hat Enterprise Linux Server subscription is attached with the following command:

$ sudo subscription-manager attach –auto

As you can see, the Red Hat Enterprise Linux Server subscription is attached.

You can list the subscription you have with the following command:

$ sudo subscription-manager list –installed

As you can see, the attached subscription in my RHEL 7 server is listed. So, I can upgrade to RHEL 7.6

Now, set the release to RHEL 7.6 with the following command:

$ sudo subscription-manager release –set 7.6

Before you start upgrading, you may check the current version of RHEL 7 you’re using as follows:

$ cat /etc/redhat-release

As you can see, I am running RHEL 7.3 at the moment.

Now, to upgrade to RHEL 7.6, run the following command:

$ sudo yum update

As you can see, 275 packages (about 317 MB) will be updated. To confirm, press y and then press <Enter>.

RHEL 7 will start downloading and install updates. It may take a while to complete.

All the updates should be installed.

Now, reboot your server with the following command:

$ sudo reboot

As you can see, RHEL 7 is updated to version 7.6.

Installing and Configuring leapp:

Now, you have to install leapp. leapp is used to upgrade RHEL 7.6 to RHEL 8.

First, enable the RHEL 7 Extras repository with the following command:

$ sudo subscription-manager repos –enable rhel-7-server-extras-rpms

RHEL 7 Extras repository should be enabled.

Now, install leapp with the following command:

$ sudo yum install leapp

Now, press y and then press <Enter> to continue.

leapp should be installed.

Now, download the leapp data archive file with the following command:

$ wget https://access.redhat.com/sites/default/files/attachments/leapp-data3.tar.gz

NOTE: wget may not be installed on your RHEL 7 server. But, you can easily install it with sudo yum install -y wget

Now, extract the leapp data archive to the /etc/leapp/files directory with the following command:

$ sudo tar -xf leapp-data3.tar.gz -C /etc/leapp/files

Now, you may remove the leapp archive for cleanup purpose with the following command:

$ rm leapp-data3.tar.gz

Now, you can start the upgrade process.

Upgrading to RHEL 8:

Now, to upgrade to RHEL 8, run the following command:

$ sudo leapp upgrade

leapp will check whether the RHEL 7 system you have is upgradable to RHEL 8. If it is, then, it will start the upgrade process. Otherwise, it will log the problems it detected in the /var/log/leapp/leapp-report.txt file. You can check that file and fix any problem reported there. Once the problem is fixed, you can try to upgrade again.

As you can see, leapp is upgrading my RHEL 7 system to RHEL 8. It will take a while to complete.

The required packages are installed and upgraded.

Now, to finish the upgrade process, reboot your server with the following command:

$ sudo reboot

While the system is being updated, it may reboot a few times on its own.

Once the update is completed, you should see Red Hat Enterprise Linux 8.0 (Ootpa) on your login screen. As you can see, the kernel is also updated to version 4.18.

You can further verify that the upgrade was indeed successful with the following command:

$ cat /etc/redhat-release

So, that’s how you upgrade from RHEL 7 to RHEL 8. Thanks for reading this article.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

How to install Java 8u121 (JDK/JRE) on CentOS, RHEL

Java 8u121 recently released, is a programming language and computing platform that is used by lots of applications and...
12/02/2020

Understanding Red Hat Linux Price and Pricing

Despite being around for two decades and being one of the most popular Linux server distributions, the pricing of Red Hat...
13/02/2020

How to Become Red Hat Certified and Is It Worth It for Your Career?

Red Hat’s contribution to the open source community is immeasurable. The American multinational software company is probably...
12/02/2020
Bài Viết

Bài Viết Mới Cập Nhật

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn
03/06/2024

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh
03/06/2024

Mua proxy Onet uy tín tại Onet.com.vn
03/06/2024

Thuê mua IPv4 giá rẻ, tốc độ nhanh, uy tín #1
28/05/2024

Thuê địa chỉ IPv4 IPv6 trọn gói ở đâu chất lượng, giá RẺ nhất?
27/05/2024