How To Apply Updates Automatically With yum-cron In RHEL 7 / CentOS 7

  • February 26, 2024
  • 0 Comments

OVERVIEW

Applying updates regularly should be the top priority in the day-to-day tasks of a System administrator. Running unpatched systems for a long time is quite risky.
There are many ways to patch your Linux systems.
Today, we will learn how to apply updates automatically with yum-cron in RHEL 7 and CentOS 7.

RHEL 7.x and CentOS 7.x versions are still being widely used.
If you're using RHEL/CentOS 7.x version, you can use yum-cron to enable automatic updates.

NOTE: RHEL 7 and CentOS 7 have an EOL of 2024-06-30


REQUIREMENTS

Before you start, you will need:

  • SSH credentials or File Manager access Logged In as Root
  • Text Editor


READ ME FIRST

This article is provided as a courtesy.

Installing, configuring, and troubleshooting third-party applications is outside the scope of Basic support. provided by Starburst Services.


INSTRUCTIONS


STEP 1

To install yum-cron in RHEL 7.x and CentOS 7.x, run:

yum install yum-cron


STEP 2

After installing yum-cron, edit its default configuration file /etc/yum/yum-cron.conf:

nano /etc/yum/yum-cron.conf


STEP 3

Adjust and set the configurations as needed:

update_cmd = security
update_messages = no
download_updates = yes
apply_updates = yes


STEP 4

Finally, enable the service to apply the settings:

systemctl enable --now yum-cron



KB Article Created: 2024-02-26

How helpful was this article to you?

Posting has been disabled.