1

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.

Daniel Howard
  • 275
  • 4
  • 10

1 Answers1

2

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,

MeMow
  • 292
  • 1
  • 7
  • Thanks for the reply but you have not answered my question at all. I'm not asking how to make yum-cron automatically install the updates. I'm asking how can I *manually* install the updates that yum-cron has downloaded for me? – Daniel Howard Dec 29 '20 at 10:17
  • my bad, please check the edit – MeMow Dec 29 '20 at 15:01
  • Yes thanks `yum update -C` is what I was looking for to install the updates that were already downloaded by yum-cron. – Daniel Howard Dec 31 '20 at 14:44