How to update CentOS, Ubuntu and Debian version of Linux Cloud Servers

2019-12-18 By Gary 7538 Views linux centos ubuntu debian development
1 reviews

The unsupported operating systems versions will no longer receive security updates. If keeping the outdated version, some unauthorized people may target those outdated operating systems because of their vulnerability, allowing them to breach the server and gain personal information. The best possible way to prevent them is to update your operating system to the latest version regularly.


The below steps can be followed to update the version for CentOS, Ubuntu & Debian.

*Please make sure to take proper backup of your entire server before performing the OS upgrade.

CentOS


The below general steps can be used to update the upgrade CentOS 7 to CentOS 8.

  1. Check the current CentOS version in the server using the following command.

    # cat /etc/redhat-release
    
  2. Once checked, then need to install EPEL Repository in the server.

    # yum install epel-release -y
    

    Centosupgrade1

  3. Install yum-utils in the server.

    # yum install yum-utils
    

    Centosupgrade2

  4. Then need to resolve RPM packages in the server.

    # yum install rpmconf
    AND
    # rpmconf -a
    

    Centosupgrade3

    Centosupgrade10

  5. Install dnf in the server, dnf is the default package manager for CentOS 8.

    # yum install dnf
    

    Centosupgrade4

  6. Remove the yum package manager from the server.

    # dnf -y remove yum yum-metadata-parser
    AND
    # rm -Rf /etc/yum
    

    Centosupgrade5

    Centosupgrade11

  7. Upgrading CentOS 7 to CentOS 8.

    # dnf upgrade
    

    Centosupgrade6

  8. Install CentOS 8 release packages on the server.

    # dnf -y upgrade http://mirror.bytemark.co.uk/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.0-0.1905.0.9.el8.x86_64.rpm
    

    Centosupgrade7

  9. Remove all the temporary files.

    # dnf clean all
    

    Centosupgrade12

  10. Need to remove the old kernel core of CentOS 7.

    # rpm -e `rpm -q kernel`
    

    Centosupgrade13

  11. Remove conflicting packages.

    # rpm -e --nodeps sysvinit-tools
    

    Centosupgrade14

  12. Launch the CentOS 8system upgrade as shown.

    # dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
    

    Centosupgrade14

    Centosupgrade14

  13. Install new Kernel Core for CentOS 8.

    # dnf -y install kernel-core
    

    Centosupgrade8

  14. Install minimal package for CentOS 8.

    # dnf -y groupupdate "Core" "Minimal Install"
    

    Centosupgrade17

  15. All the steps done. Now you can check the CentOS version in the server.

    # cat /etc/redhat-release
    

    Centosupgrade9


Ubuntu & Debian


  1. To check the current OS version in the server.

    # cat /etc/issue
    

    Ubuntuupgrade1

  2. Upgrade the installed packages of Ubuntu version 16.04.

    # sudo apt-get update && sudo apt-get upgrade
    

    Ubuntuupgrade2

    Ubuntuupgrade3

  3. Install ubuntu update manager.

    # sudo apt install update-manager-core
    

    Ubuntuupgrade4

  4. Start to upgrade Ubuntu server.

    # sudo do-release-upgrade
    

    Ubuntuupgrade5

    Ubuntuupgrade6

    Ubuntuupgrade7

    Enter Y to continue.

    Ubuntuupgrade8

    Once this done, need a system reboot. Enter Y to restart the server.

  5. Now you can check the OS version in the server.

    # cat /etc/issue
    

    Ubuntuupgrade9

What do you think about this article?

Rate this article
LayerStack Promotion
Need assistance?

Try this guide to receive free bundled services at signup on a new free account.

Sign Up

Your Feedback Is Important

We hope you’ll give the new products and updates a try. If you have an idea for improving our products or want to vote on other user ideas so they get prioritized, please submit your feedback on our Community platform. And if you have any questions, please feel free to ask in the Community or contact our Technical Support team.