yum-cron installing and configuring

yum-cron installing and configuring

Installing yum-cron

The first thing you have to do is to install yum-cron


yum install yum-cron

The next thing to do is to add the service to the available services:


systemctl enable yum-cron.service

or


chkconfig yum-cron on

yum-cron

configuring yum-cron

open /etc/yum/yum-cron.conf in your editor of choice. In centos 7 there are 3 settings to change:


# Whether a message should emitted when updates are available.
update_messages = yes

# Whether updates should be downloaded when they are available. Note
# that updates_messages must also be yes for updates to be downloaded.
download_updates = yes

# Whether updates should be applied when they are available.  Note
# that both update_messages and download_updates must also be yes for
# the update to be applied
apply_updates = yes

CentOS 7 also has an hourly configuration file at /etc/yum/yum-cron-hourly.conf

There are 4 lines to change



#  What kind of update to use:
# default                            = yum upgrade
# security                           = yum --security upgrade
# security-severity:Critical         = yum --sec-severity=Critical upgrade
# minimal                            = yum --bugfix update-minimal
# minimal-security                   = yum --security update-minimal
# minimal-security-severity:Critical =  --sec-severity=Critical update-minimal
update_cmd = security

# Whether a message should emitted when updates are available.
update_messages = yes

# Whether updates should be downloaded when they are available. Note
# that updates_messages must also be yes for updates to be downloaded.
download_updates = yes

# Whether updates should be applied when they are available.  Note
# that both update_messages and download_updates must also be yes for
# the update to be applied
apply_updates = yes

You will now have hourly security updates and daily updates for everything else. The updates will download and apply automatically :D

The last thing you need to do is to turn on the yum cron service:


service yum-cron start

or


systemctl start  yum-cron.service

Sources: Fedora Project

Tags for yum-cron installing and configuring

default file install open settings updates upgrade