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
Top 20 OpenSSH Server Best Security Practices ssh linux aix
Viewed 7459 times since Fri, May 15, 2020
How to enable Proxy Settings for Yum Command on RHEL / CentOS Servers
Viewed 14681 times since Thu, Jul 19, 2018
Manage SSH Key File With Passphrase
Viewed 3269 times since Tue, Mar 5, 2019
Prosty skaner portów TCP w bash
Viewed 4186 times since Thu, May 24, 2018
RHEL7: How to get started with Firewalld.
Viewed 13661 times since Wed, May 22, 2019
LVM: Recovering Physical Volume Metadata
Viewed 14354 times since Sat, Jun 2, 2018
How to use yum command on CentOS/RHEL
Viewed 12600 times since Wed, Oct 17, 2018
RHEL7 slow ssh login
Viewed 5458 times since Tue, Aug 6, 2019
Linux Chage Command to Set Password Aging for User
Viewed 3692 times since Tue, Sep 11, 2018
Super Grub2 Disk
Viewed 7748 times since Wed, May 22, 2019