Comments on How to Setup Automatic Security Updates on CentOS 7

Security updates, as most of you'd agree, are very important. On Linux, it's always advisable to keep the installed packages up to date, especially when it comes to security. In general, users should apply security updates to their Linux systems within 30 days of being released. In this tutorial, we will discuss how you can configure a CentOS 7 server for automatic security updates.

8 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Nagarajan

yum security will not work in centos 7. The yum repos for Centos 7 does not provide the metadata required for yum security update. It won't install all the security packages.

 

By: Jackie M

grep yum-daily /var/log/cron

and

grep Update /vat/log/yum.log

 

using cat is redundant and just using grep is easier to cut and paste as well

By: Tom

These instructions are for a real RHEL server. For CentOS they do not apply as Nagarajan points out in previous comment.

By: Bilal

The crons under cron.daily/ cron.hourly/ cron.monthly/ cron.weekly/ using /etc/yum/yum-cron-hourly.conf. Any additional changes after installed yum-cron will not effect crons behavior. So we need to run below command i guess.

[root@localhost ~]#  yes | cp -f /etc/yum/yum-cron.conf /etc/yum/yum-cron-hourly.conf

By: Steve Alder

It is aways a better option to configure a service prior to starting it the first time.  Particularly when you are configuring a service that have the ability/intent to change/update packages.

Also you can simplify the process of enabling and starting it by using this syntax. 'systemctl enable --now yum-cron'

By: no reply

All of you nay-sayers out there are incompetent and are undereducated (if educated at all). Security updates ARE supported in CentOS. Any system administrator can rebuild a repository and add the associated tags and metadata entries necessary for CentOS to process security-only updates.

However, as this article doesn’t discuss this pre-requisite activity it is a bit lacking.

By: Nigel

As others have pointed out, this doen't work on CentOS 7:

"No package yum-cron available.

 

Error: Nothing to do"

By: till

I don't see any other comment that claims that there is no yum-cron package. The package is there on any normal CentOS 7 system, see:

 

Resolving Dependencies

--> Running transaction check

---> Package yum-cron.noarch 0:3.4.3-168.el7.centos will be installed

--> Finished Dependency Resolution

 

Dependencies Resolved

 

=============================================================================================================================================================================================

 Package                                     Arch                                      Version                                                 Repository                               Size

=============================================================================================================================================================================================

Installing:

 yum-cron                                    noarch                                    3.4.3-168.el7.centos                                    base                                     66 k

 

Transaction Summary

=============================================================================================================================================================================================

Install  1 Package

Total download size: 66 k

Installed size: 51 k