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?
4 Answers
You don't have to restart the server unless you are getting a message (from yum) that explicitly encourages 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 switches the old kernel with the new one without the need for a reboot).
So in the end, it's your decision if you want to reboot. I would suggest that unless there's a major security update for the kernel you shouldn't reboot during work hours. Otherwise, if the server is idle (and you don't need it for the next 30 minutes or so, because in some rare circumstances updates could interfere with the boot process), I would suggest you reboot it.
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.

- 3,098
-
5updates to libc without reboot can give issues – Folkert van Heusden Jan 02 '12 at 09: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 02 '12 at 14:25
-
3To say it more clean than Folkert: You should also reboot after a glibc update. – Nils Jan 02 '12 at 21:58
-
1@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 'SO- stop being evil' Jan 02 '12 at 23:43
-
@Gilles true, but is there a way to easily sort out which (running) services are affected in RH? – Nils Jan 03 '12 at 20:35
-
2@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 'SO- stop being evil' Jan 03 '12 at 20:37
-
@Gilles SLES11 SP1 seems to have such a mechanism. After a patch-install a zypper command shows the affected services. I did not debug how it is being done... – Nils Jan 03 '12 at 20:42
-
@Nils I think it's like Debian: the library package upgrade script checks which services are installed and linked against the library. – Gilles 'SO- stop being evil' Jan 03 '12 at 20:56
-
If the kernel, libc, glibc is updated, do I really NEED to restart the server, if I don't restart the server, will it keep working correctly? – Phil Jan 05 '12 at 03:51
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.

- 18,492
I don't trust the auto-updates, as any update has the potential to disable a service. I do them manually on the servers, and if kernel or glib is involved, I reboot the server afterwards.