Patching Vulnerabilities on CentOS the Easy Way

The Alibaba Cloud console keeps warning about vulnerabilities.
Kernel and package flaws on Linux are worth taking seriously — fix them before something breaks.
The console's patch feature costs money, but patching these yourself takes only a few commands.

On CentOS it's simple: use yum, and there are just two steps.
(Back up first, or take a snapshot of the server before you run anything.)

  1. Clear the cached metadata
    yum clean all
  2. Install all software and system updates
    yum -y update
    yum -y upgrade (upgrades all packages, but leaves the software and kernel alone)

If a fix needs a restart, reboot safely with:
reboot or shutdown -r 0

CentOS isn't the only distribution in common use, of course — Ubuntu is everywhere too. On Ubuntu or Debian, swap yum for apt; the steps are much the same.

Leave a Comment

Comments No Comments

Table of Contents