如何在 Linux 上编译 apache/httpd?

How to compile apache/httpd on Linux?

我正在尝试在 Linux 上编译 https://github.com/apache/httpd

  1. 没有 在 repo 中有 ./configure 脚本。
  2. 没有 在 repo 中有 ./autoconf 脚本。
  3. make 也没有 Makefile(默认值)。

我无法从源代码编译 repo 中的 README 或 INSTALL 文件中的信息。

如何在 Linux 上编译 https://github.com/apache/httpd

第一个:

./buildconf

由于 Senthil Kumaran 回答了他的问题,您可以添加 --with-apr=/path/to/apr --with-apr-util=/path/to/apr-util

然后做剩下的事情。

https://httpd.apache.org/docs/2.4/programs/configure.html

剩下的小教程:

通常需要 libssl、libnghttp2、libexpat、libpcre、apr、apr-util

./configure --prefix=/path/to/install/apache --enable-mpms-shared=all --enable-mods-shared=reallyall

然后:

make && make install

从下次开始,使用相同的配置:

make clean && ./config.nice && make && make install

我 运行 出错了,当我尝试 ./buildconf

时 APR 没有安装

以下步骤有效。

  1. 从 Apache 网站下载 apr 源代码
  2. 从 Apache 网站下载 apr-util 源。

./buildconf --with-apr=/home/senthil/Downloads/apr-1.7.0/ --with-apr-util=/home/senthil/Downloads/apr-util-1.6.1

./configure

make