缺少 apxs2,因此我无法安装 Apache mod x-sendfile

缺少 apxs2,因此我无法安装 Apache mod x-sendfile

我有一台装有 Apache2.4 的 CentOS 5.8 服务器,我想安装 mod x-sendfile。

我已将 c 文件上传到服务器,并且根据说明我应该运行:

apxs2 -cia mod_xsendfile.c

我试过了,但似乎我没有 apxs2。我在 /usr/sbin/apxs 下有 apxs。

我该怎么办?我应该使用 apxs 还是应该以某种方式获取 apxs2?

答案1

CMIIW 如何安装 apache 2.4?由于 Centos 5 默认使用 apache 2.2,如果您通过 YUM/RPM 安装 httpd-devel,您将看到 /usr/bin/apxs 二进制文件(http://rpm.pbone.net/index.php3/stat/6/idpl/18132345/dir/centos_5/com/httpd-devel-2.2.3-65.el5.centos.i386.rpm)。

如果您从源代码编译,则 apxs 应该安装在 $PREFIX/bin/apxs 上。在某些发行版(例如 ubuntu/debian)中,您能够安装 httpd v1 和 httpd v2,也许它用于区分 apache(apxs)和 apache2(apxs2)。

如果您确定 apxs 来自您使用的 httpd 版本,则只需使用 apxs 即可。

相关内容