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
KONTO SFTP Z CHROOTEM Z UŻYCIEM OPENSSH-SERVER NA CENTOS/RHEL6
Viewed 1941 times since Fri, Nov 30, 2018
logrotate Understanding logrotate utility
Viewed 1900 times since Sun, Jan 12, 2020
LVM: Extend SWAP size by adding a new Logical Volume
Viewed 3261 times since Sat, Jun 2, 2018
Using stunnel and TinyProxy to obfuscate HTTP traffic
Viewed 7084 times since Fri, Sep 28, 2018
How To: Linux Hard Disk Encryption With LUKS [ cryptsetup Command ]
Viewed 7420 times since Fri, Jul 13, 2018
RHEL: Bonding network interfaces
Viewed 3815 times since Sat, Jun 2, 2018
Jak ustawić LVM, jak robić snapshoty oraz automatycznie powiększać LV, czyli małe howto
Viewed 4674 times since Sun, May 20, 2018
Df command in Linux not updating actual diskspace, wrong data
Viewed 2998 times since Wed, May 30, 2018
chrt command: Set / Manipulate Real Time Attributes of a Linux Process
Viewed 11218 times since Mon, Feb 17, 2020
Linux LVM recovery
Viewed 17889 times since Wed, Jan 23, 2019