大网数据广告活动
服务器运维问答

How can I know if reboot is required after update?

· 52CE 我爱测

I have 4 servers with Debian Wheezy OS. I have Apticron installed that informs me about updates. Debian updates are realized so often that when I finish to update the last of 4 servers I get new email about new updates on the fir…

问题原文

原帖链接 · user1406271 · CC BY-SA 4.0

I have 4 servers with Debian Wheezy OS. I have Apticron installed that informs me about updates. Debian updates are realized so often that when I finish to update the last of 4 servers I get new email about new updates on the first server. I try to update all servers when I get a notification but I never know if there is a need to reboot the servers. I have read that if the directory /var/run contains file reboot-required I have to reboot the server. But I never have seen this file in /var/run. How can I know when reboot is required? I don't want reboot my servers every time when I install new updates if it's not needed.

I understand that if I update PHP or MySQL, etc I don't need to reboot the server but updates usually contain many lib....

Below are 9 updates (I have received this week).

krb5-locales 1.10.1+dfsg-5+deb7u3
libdbus-1-3 1.6.8-1+deb7u6
libgssapi-krb5-2 1.10.1+dfsg-5+deb7u3
libk5crypto3 1.10.1+dfsg-5+deb7u3
libkrb5-3 1.10.1+dfsg-5+deb7u3
libkrb5support0 1.10.1+dfsg-5+deb7u3
libruby1.8 1.8.7.358-7.1+deb7u2
libxml2 2.8.0+dfsg1-7+wheezy3
ruby1.8 1.8.7.358-7.1+deb7u2

I have no idea what is libkrb, libgssapi, etc. How can I detect if reboot is needed? Please do not suggest to install UnattendedUpgrades to let the servers update automatically because this can cause websites going offline if something updates not correct.

已采纳解答

原帖链接 · Nat · CC BY-SA 4.0

Installing debian-goodies package provides checkrestart.

It shows which processes are using old versions of libs previously installed.

When not being able to remove all processes out of that list,
a reboot might be needed.

Besides installing needrestart package might help as well, as pointed out in this post comments and as one could find among debian packages search results

check which daemons need to be restarted after library upgrades

In general, consider rebooting after kernel updates (as pointed out by YuKYuk)!

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-02-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。