Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm aware that it is good to run yum update from time to time to keep my Centos server updated, and I even see that there is way to automate this update. My question is, is it necessary to restart the server after the update? Is it a good idea? What happens if I keep updating and never restart?


So from the answers, I believe it is correct to say that I need to restart the server if the Kernel, libc, glibc has been updated. Alternatively use KSplice.

share|improve this question

3 Answers

up vote 4 down vote accepted

You aren't have to restart the server, unless you are getting a message (from yum) that explicitly encourage you to do so.

But, you can't use the new Kernel that was updated until you restart the system (unless you are using something like Ksplice, which is a technology that switch the old kernel with the new one without the need for reboot).

So at the end, you are left with your decision if you want to reboot, I would suggest that unless there isn't any major security update for the kernel you shouldn't reboot in work hours, and if the server is idle (and you don't need it in 30min or so, because some rare times updates could crash the boot process) i would suggest you reboot it.

share|improve this answer

If kernel has updated, yes it is a good idea to reboot because new kernel will be used only after reboot. other packages will be updated in place, no need to reboot.

share|improve this answer
3  
updates to libc without reboot can give issues – Folkert van Heusden Jan 2 '12 at 9:42
that is not correct, there are a number of other packages that require a reboot to be updated correctly, as pointed out above libc is one, there are others (systemd/init) – totaam Jan 2 '12 at 14:25
1  
To say it more clean than Folkert: You should also reboot after a glibc update. – Nils Jan 2 '12 at 21:58
@Nils You don't need to reboot; it's enough to restart all the services which you want to switch to run against the new libc. – Gilles Jan 2 '12 at 23:43
1  
@Nils On most systems, all services are linked against libc. There's no automatic way to know which ones must be restarted: only the ones that are affected by whatever bug the upgrade fixes are important. – Gilles Jan 3 '12 at 20:37
show 4 more comments

I have a fully automated server that gets its daily updates via yum-cron and I let it reboot every weekend (via root-crontab).

This has been working well for more than three years now.

share|improve this answer
I like this solution. – Phil Jan 5 '12 at 3:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.