yum更新后重启服务?

SPR*_*BRN 6 yum centos services

今天我使用 yum 更新了我们的几个服务器。

4 package(s) needed for security, out of 4 available
Run "sudo yum update" to apply all updates.
Run Code Online (Sandbox Code Playgroud)

三个是 openssh 更新,一个是 java。更新后是否需要重新启动openssh服务器?

当我看到 Apache 已更新时,我手动重新启动它。我对 PHP 更新也这样做,但不知道这是否真的有必要。

在 Debian 上,使用 apt-get 时,我看到服务正在重新启动的消息。yum 也是这样吗?

更新后需要手动重启哪些服务?还是 yum 处理重启?

小智 3

在您\xe2\x80\x99 运行 yum update 升级库后,可能有正在运行的服务仍在使用旧的库副本。此类服务可能仍然容易受到旧库中安全漏洞的影响。

\n\n

使用 lsof 列出使用已删除文件的进程,\xe2\x80\x99 相对容易发现哪些进程受到影响:

\n\n
# lsof | awk \'$5 == "DEL" { print }\'\nauditd     1001  1001 root DEL REG /usr/lib64/libnss_files-2.18.so;53bd9626\nlibvirtd   1468  1509 root DEL REG /usr/lib64/libnss_files-2.18.so;53bd9626\n[lots more output]\n
Run Code Online (Sandbox Code Playgroud)\n\n

如果您在更新(例如)glibc 后实际运行此命令,您\xe2\x80\x99 将获得难以筛选的页面和页面。

\n\n

然而,systemd我们可以将进程 ID 映射到服务和用户会话。

\n\n

\xe2\x80\x99 就是以下脚本的作用:

\n\n

http://oirase.annexia.org/rwmj.wp.com/needs-restart.pl

\n\n

典型的输出如下所示:

\n\n

为了完成 glibc-2.18-11.fc20.x86_64 的安装,\n您应该重新启动以下服务:

\n\n
    - accounts-daemon.service - Accounts Service   \n    - console-kit-daemon.service - Console Manager\n    - udisks2.service - Disk Manager\n    - auditd.service - Security Auditing Service\n    - dbus.service - D-Bus System Message Bus\n    - rtkit-daemon.service - RealtimeKit Scheduling Policy Service\n    - upower.service - Daemon for power management\n    - colord.service - Manage, Install and Generate Color Profiles\n    - firewalld.service - firewalld - dynamic firewall daemon\n    - polkit.service - Authorization Manager\n    - rsyslog.service - System Logging Service \n    - NetworkManager.service - Network Manager   \n    - libvirtd.service - Virtualization daemon\n    - gdm.service - GNOME Display Manager\n\nIn order to complete the installation of glibc-2.18-11.fc20.x86_64,\nyou should tell the following users to log out and log in:\n\n    - session-1.scope - Session 1 of user rjones\n
Run Code Online (Sandbox Code Playgroud)\n