Personal tools
You are here: Home Linux CentOs CentOS 7 automatic updates with yum-cron

CentOS 7 automatic updates with yum-cron

yum-cron is an optional package that can be configured to automatically apply updates. It runs from cron and is gated (enabled/disabled) by a systemd service.  Both a daily and an hourly configuration is setup in cron.

The default configuration will not apply the updates.  The following changes are made:

  • enable updates to be applied


Install the package

Install the rpm package (the service is enabled, but not started by default):

# yum install yum-cron
# systemctl start yum-cron


Reconfigure the daily cron task to apply updates:

# sed -ie 's/apply_updates = no/apply_updates = yes/' /etc/yum/yum-cron.conf




Default configuration

The defaults in '/etc/yum/yum-cron.conf':

update_cmd = default
update_messages = yes
download_updates = yes
apply_updates = no
random_sleep = 360

system_name = None
emit_via = stdio
ouput_width = 80

email_from = root@localhost
email_to = root
email_host = localhost

group_list = None
group_package_types = mandatory, default

debuglevel = -2
mdpolicy = group:main


Document Actions