How to enable automatic updates for RHEL/CentOS 8

www.la‮c.iruttu‬om
How to enable automatic updates for RHEL/CentOS 8

To enable automatic updates for Red Hat Enterprise Linux (RHEL) or CentOS 8, follow these steps:

  1. Install the yum-cron package using the package manager:
sudo yum install yum-cron
  1. Enable and start the yum-cron service:
sudo systemctl enable yum-cron
sudo systemctl start yum-cron
  1. The yum-cron service reads its configuration from the file /etc/yum/yum-cron.conf. To configure the behavior of the automatic updates, you can edit this file.

  2. By default, yum-cron is configured to check for updates every night at 2:00 AM and to download and install any available updates. To change the frequency of the update checks, you can edit the update_cmd option in the [commands] section of the configuration file.

For example, to check for updates every hour, you can set the update_cmd option to hourly. To check for updates every day at noon, you can set the update_cmd option to daily.

  1. To enable automatic download and installation of updates, set the apply_updates option in the [commands] section to yes.

For example:

[commands]
apply_updates = yes
  1. Save the configuration file and restart the yum-cron service to apply the changes:
sudo systemctl restart yum-cron

Automatic updates should now be enabled and configured according to your settings.

Created Time:2017-10-28 21:39:03  Author:lautturi