What is yum-cron ?

What is yum-cron ?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux Server 6.x
  • Red Hat Enterprise Linux Server 7.x

Issue

  • The yum-cron package provides a convenient way to check for, download and apply updates automatically.
  • The cron jobs from the yum-cron package are active immediately after installing the package and there’s no extra configuration necessary. The job will be run when daily cron jobs are set to run.

Resolution

  • To install yum-cron package
# yum -y install yum-cron
# chkconfig yum-cron on
  • Then edit /etc/sysconfig/yum-cron (RHEL 6) to set MAILTO= email address or /etc/yum/yum-cron.conf (RHEL 7) to set email_to= for email notifications.

    • For RHEL 6
MAILTO=sys@example.com
  • For RHEL 7
email_to=sys@example.com
  • To exclude packages using yum-cron:-
  • For RHEL 6
YUM_PARAMETER=kernel* mysql*
  • For RHEL 7 edit below option in the base section of /etc/yum/yum-cron.conf file.
[base]
exclude=kernel* mysql*
  • For RHEL 7 use following option in yum-cron configuration file to install security updates.
[commands]
#  What kind of update to use:
# default                            = yum upgrade
# security                           = yum --security upgrade
# security-severity:Critical         = yum --sec-severity=Critical upgrade
# minimal                            = yum --bugfix upgrade-minimal
# minimal-security                   = yum --security upgrade-minimal
# minimal-security-severity:Critical =  --sec-severity=Critical upgrade-minimal
update_cmd = security
  • To start yum-cron service after editing configuration file.

  • For RHEL 6

# service yum-cron start
  • For RHEL 7
# systemctl start yum-cron
  • Component
  • yum
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
SSH: Execute Remote Command or Script – Linux
Viewed 2988 times since Mon, Feb 18, 2019
RHEL: Checking HBAs
Viewed 16018 times since Sun, May 27, 2018
RHEL: Resize/disable /dev/shm filesystem
Viewed 16254 times since Sun, May 27, 2018
Transform XML to CSV Format | Unix String Pattern Manipulation The Ugly Way
Viewed 7553 times since Sun, Jan 9, 2022
How to recover error - Audit error: dispatch err (pipe full) event lost
Viewed 27416 times since Tue, Aug 6, 2019
Managing temporary files with systemd-tmpfiles on Red Hat Enterprise Linux 7
Viewed 10638 times since Sun, Nov 22, 2020
How To Create a Linux Swap File
Viewed 3177 times since Fri, Jun 8, 2018
Understanding System auditing with auditd
Viewed 11346 times since Fri, Apr 5, 2019
RHEL : How to deal with “CLOSE_WAIT” and “TIME_WAIT” connection
Viewed 28196 times since Thu, Feb 14, 2019
ZFS: Remove an existing zfs filesystem
Viewed 2687 times since Sun, Jun 3, 2018