首页 文章

centos 7获得最新的apache包

提问于
浏览
2

这个问题来自我对包管理器的不了解,我运行 yum list 并得到 httpd-2.4.6-40.el7.centos.4.x86_64

https://rpmfind.net/linux/RPM/centos/updates/7.2.1511/x86_64/Packages/httpd-2.4.6-40.el7.centos.4.x86_64.html

Build date: Mon Jul 18 17:32:11 2016

我做了 yum update && yum install httpd ,这会得到我最新版的httpd吗?

我在哪里可以在线检查以确认我的包/版本是最新的?

如何为我的httpd版本定期安装安全补丁?

update

[centos ~]$ httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Jul 18 2016 15:30:14

[centos ~]$ rpm -q --changelog httpd | more
* Mon Jul 18 2016 CentOS Sources <bugs@centos.org> - 2.4.6-40.el7.centos.4
- Remove index.html, add centos-noindex.tar.gz
- change vstring
- change symlink for poweredby.png
- update welcome.conf with proper aliases

3 回答

  • 4

    正如Aaron所提到的,像yum这样的包管理器只会应用安全补丁,因为它们优先考虑新功能的稳定性(有安全性) .

    因此,在您进行“yum更新”之后,您将使用httpd 2.4.6的修补版本,该版本应具有所有必需的安全补丁,直到最新的httpd版本(撰写本文时为2.4.23),但没有其他版本非安全性更改(例如,http / 2支持或任何其他功能和错误修复,除非安全相关) .

    所以它不再是真正的2.4.6,尽管有名字,但同时它绝对不是2.4.23 .

    您可以通过运行此命令(as detailed here)确认已应用的修补程序:

    rpm -q --changelog httpd | more
    

    或者,也许,检查特定的CVE:

    rpm -q --changelog httpd | grep CVE-Number
    

    每个版本的Apache httpd中修复的漏洞(应该在很短的时间内由Red Hat / Centos重新移植)都在这里:https://httpd.apache.org/security/vulnerabilities_24.html或者这里:https://www.cvedetails.com/version-list/45/66/1/Apache-Http-Server.html

    定期安装安全更新的最佳方法是定期执行"sudo yum update"或考虑安装yum-cron来为您执行此操作 . 还有some debate as to whether this should be fully automated in prod .

  • 1

    我找到了一个很棒的存储库,其中包含由这些人提供的Nginx和Apache服务器的最新软件包CodeIT

    我在博客文章中描述了安装过程 . 随意参考它以获得更多细节 .

    https://crosp.net/blog/administration/install-latest-apache-server-centos-7/

  • 0

    yum 仅使用其配置使用的存储库;不只是互联网上的任何RPM . 这将是危险的 . 如果您拥有最新版本的CentOS,他们将发布 httpd 的安全更新 . 安装后, yum update 将引入补丁 .

    CentOS是企业级操作系统 . 他们不会看到他们将使用相同的版本,例如 2.4 ,但应用补丁 . 然后,操作系统的下一个主要版本将具有更新的版本,例如 3.x . 像Firefox这样的例外情况很少,他们将继续使用ESR版本 .

相关问题