Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
57 lines (47 sloc) 1.07 KB
layout title date tags author comments
post
How to enable auto updates on CentOS 7 w/ yum-cron
2018-07-05 20:00:00 +0200
linux
Daniel Rabanser
true

In this post you will learn how to enable automatic system updates for your CentOS 7 / RHEL 7 system.


Update your system

It might be a good idea to update your system before installing something. Kind of ironic isn't it? We'll do it anyway.

[root@centos ~]# yum update

Install yum-cron

[root@centos ~]# yum install yum-cron

Configure yum-cron

This will enable daily updates

[root@centos ~]# vi /etc/yum/yum-cron.conf
apply_updates = yes                  

This will enable hourly security updates

[root@centos ~]# vi /etc/yum/yum-cron-hourly.conf
update_cmd = security
update_messages = yes
download_updates = yes
apply_updates = yes

Start yum-cron

Lastly start yum-cron and enable it to start automatically at boot time

[root@centos ~]# systemctl enable yum-cron
[root@centos ~]# systemctl start yum-cron