使基于 apt 的发行版(作为 Web 服务器运行)保持最新状态
我正在配置运行 Debian 5.0 的生产 Web 服务器。 如何使基于 apt 的发行版保持最新状态。 有什么最佳实践或神奇的方法吗? 通过 ssh 登录并手动运行 apt-get update 似乎不合理。
编辑: 经过评论中的一些讨论后,我现在决定手动升级服务器,但想知道如何保持最新的应用程序包。
I am in the process of configuring a production web server running Debian 5.0. How do you keep an apt-based distro up to date. Is there any best practice or magical ways of doing it? Logging in via ssh and running apt-get upgrade
manually seems unrational.
EDIT:
After some discussion in the comments I am now deciding to upgrade the server manually but would like to know how to keep up to date with what packages to apply.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
自动更新您的服务器可能会出现问题; 安装可能会失败,新包的行为可能略有不同(debian 非常擅长避免这种情况),或者条件可能已经改变,只有当包安装强制服务重新启动时才变得明显,等等。所以我建议不要使用无人值守的包安装。
话虽如此,您可以查看 cron-apt,您可以配置它来执行此操作,或者提前下载软件包,并提醒您可用的更新,以便您只需登录并安装它们即可。
另外/或者,您可以订阅 debian-security-announce,它会发送新安全更新的通知。
Automatically updating your server could be problematic; the installation could fail, the new package could have slightly different behavior (debian is pretty good at avoiding this), or a condition might have changed which only becomes evident when package installation forces a service restart, etc. So I would advise against unattended package installs.
That being said, you could look into cron-apt, which you can configure to do just that, or to download the packages in advance, and alert you about the available updates so that all you have to do is log in and install them.
Additionally/alternatively, you could subscribe to debian-security-announce, which sends out notices of new security updates.