How to apply updates downloaded by yum-cron?
I have yum-cron running on a new Centos 7 server. I noticed in the daily emails that it sent me that the same packages were appearing every day. On further inspection, I found that this is because I had the following setting in my /etc/yum/yum-cron.conf
file.
download_updates = yes
apply_updates = no
So yum-cron is downloading the updates, but never actually installing them.
I haven't touched the config, so these are the default settings.
My main question is, how exactly should I install the updates that yum-cron has downloaded for me?
I've been searching for an answer to this, but all I've been able to find is a dozen posts/tutorials on setting up yum-cron, and all of them just instruct you to set apply_updates = yes
with no further explanation. There must be a reason why apply_updates = no
is the default setting. I'm guessing it's to prevent some problem with an update leaving your system in a broken state while you're asleep. To me, this seems pretty sensible, provided you know how to install the updates when you're ready.
Edit to clarify the question:
To be clear, I'm not asking how to make yum-cron automatically install the updates... I know that already, a dozen tutorials have told me to set apply_updates = yes
. My question is, suppose I leave the default behaviour with apply_updates = no
then yum-cron will download but not install the updates, so in that case how do I manually install the updates that yum-cron downloaded for me.
Yes, it is that simple and that practical ! I have set it up my self on a bunch of one-app servers and it works like a charm (you need to restart the service of course).
That being said, there could be some criticals machine that need to be handled with care before any update (make a vm snapshot, test the app after the update) with those i'd recommand a manual update just in case
to do so, maybe try
#yum update -C
which makes yum use cache to install packages,