Menu
blog.headdesk.me
blog.headdesk.me

Automatically update EL8

Posted on 2021/07/122021/07/25

In EL7, we can use yum-cron to automatically install updates. On EL8, the equivalent tool is dnf-automatic. Here is how to set it up.

Install the package

dnf -y install dnf-automatic

Edit the config

Edit /etc/dnf/automatic.conf. It is quite similar to yum-cron config. Some of the important parameters are:

upgrade_type = default # default: all updates; security: security updates only
apply_updates = yes # no: do not apply the updates

If you want to receive email notification, edit the section under [emitters]

Finally, enable the systemd timer

systemctl enable --now dnf-automatic.timer

By default, this timer runs the job daily at 0600, plus a random delay. To see when the next run is scheduled at, run this

[[email protected] ~]# systemctl list-timers dnf-automatic.timer
NEXT LEFT LAST PASSED UNIT ACTIVATES
Tue 2021-07-13 06:23:05 HKT 13h left n/a n/a dnf-automatic.timer dnf-automatic.service

Occasionally, look for processes that require restarting after update.

dnf needs-restarting

If you configure email emitter, you will receive an email whenever an update is downloaded.

The following updates were downloaded on 'rock.one27.lab':
================================================================================
 Package                Architecture   Version             Repository      Size
================================================================================
Upgrading:
 rocky-gpg-keys         noarch         8.4-30.el8          baseos          11 k
 rocky-release          noarch         8.4-30.el8          baseos          20 k
 rocky-repos            noarch         8.4-30.el8          baseos          13 k

Transaction Summary
================================================================================
Upgrade  3 Packages

facebookShare on Facebook
TwitterTweet

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Full text search

Recent Posts

  • Terraform and segregated permissions
  • LVM Compression and Deduplication
  • Edit gpg encrypted file with vim
  • Lelit Elizabeth PL92T Pressure Tuning
  • jq transformation
  • aws (8)
  • coffee (1)
  • headfi (1)
  • linux (6)
  • others (58)
  • security (2)
  • tech (36)
  • wordpress (2)

apache aws awscli azure backup clearlinux cloud coffee docker DOCP ec2 EL8 epyc espresso featured gpg jenkins kernel lelit linux lvm meltdown memory MFA mikrotik php python rdp Redhat RHEL roasting rpm Ryzen site-to-site snapshot spectre tech terraform tuning ubuntu ubuntu upgrade vim vpn wordpress xdotool

©2023 blog.headdesk.me | Powered by SuperbThemes & WordPress