最新版本2.4的httpd已经不在内置apr和apr-util了,但是在configure --help中却还能看到:
[root@rh-1 httpd-2.4.3]# ./configure --help | grep apr
--with-included-apr Use bundled copies of APR/APR-Util
--with-apr=PATH prefix for installed APR or the full path to
apr-config
--with-apr-util=PATH prefix for installed APU or the full path to
以前版本都能使用with-included-apr来安装,现在的新版本查看安装手册后发现比以前麻烦了许多,需要自行提前安装准备pcre库和apr库
The following requirements exist for building Apache httpd:
- APR and APR-Util
- Make sure you have APR and APR-Util already installed on your system. If you don't, or prefer to not use the system-provided versions, download the latest versions of both APR and APR-Util from Apache APR, unpack them into
./srclib/apr
and./srclib/apr-util
(be sure the domain names do not have version numbers; for example, the APR distribution must be under ./srclib/apr/) and use./configure
's--with-included-apr
option. On some platforms, you may have to install the corresponding-dev
packages to allow httpd to build against your installed copy of APR and APR-Util. - Perl-Compatible Regular Expressions Library (PCRE)
- This library is required but not longer bundled with httpd. Download the source code from http://www.pcre.org, or install a Port or Package. If your build system can't find the pcre-config script installed by the PCRE build, point to it using the
--with-pcre
parameter. On some platforms, you may have to install the corresponding-dev
package to allow httpd to build against your installed copy of PCRE. - Disk Space
- Make sure you have at least 50 MB of temporary free disk space available. After installation the server occupies approximately 10 MB of disk space. The actual disk space requirements will vary considerably based on your chosen configuration options, any third-party modules, and, of course, the size of the web site or sites that you have on the server.
- ANSI-C Compiler and Build System
- Make sure you have an ANSI-C compiler installed. The GNU C compiler (GCC) from the Free Software Foundation (FSF) is recommended. If you don't have GCC then at least make sure your vendor's compiler is ANSI compliant. In addition, your
PATH
must contain basic build tools such asmake
. - Accurate time keeping
- Elements of the HTTP protocol are expressed as the time of day. So, it's time to investigate setting some time synchronization facility on your system. Usually the
ntpdate
orxntpd
programs are used for this purpose which are based on the Network Time Protocol (NTP). See the NTP homepage for more details about NTP software and public time servers. - Perl 5 [OPTIONAL]
- For some of the support scripts like
apxs
ordbmmanage
(which are written in Perl) the Perl 5 interpreter is required (versions 5.003 or newer are sufficient). If you have multiple Perl interpreters (for example, a systemwide install of Perl 4, and your own install of Perl 5), you are advised to use the--with-perl
option (see below) to make sure the correct one is used byconfigure
. If no Perl 5 interpreter is found by theconfigure
script, you will not be able to use the affected support scripts. Of course, you will still be able to build and use Apache httpd.