-
Download
[Email protected] ~]# CD/USR/LOCAL/SRC
[Email protected] src]# wget http://mirrors.sohu.com/apache/httpd-2.2.31.tar.gz
-
Extract
Tar zxvf httpd-2.2.31.tar.gz
-
Go to Catalog
[[email protected] src]# ls
httpd-2.2.31 httpd-2.2.31.tar.bz2 httpd-2.2.31.tar.gz
[Email protected] src]# cd/usr/local/src/httpd-2.2.31
[[email protected] httpd-2.2.31]# ls
About_apache config.layout Httpd.spec LICENSE readme.platforms
ACINCLUDE.M4 Configure include makefile.in readme-win32.txt
APACHE.DSW configure.in INSTALL Makefile.win Roadmap
Build Docs INSTALLBIN.DSP Modules Server
BUILDALL.DSP Emacs-style LAYOUT NOTICE srclib
BUILDBIN.DSP HTTPD.DEP LIBHTTPD.DEP nwgnumakefile Support
buildconf httpd.dsp libhttpd.dsp OS Test
Changes Httpd.mak Libhttpd.mak README VERSIONING
-
Configuring compilation parameters
--prefixspecify where to install,--enable-someans to enable DSO--enable-deflate=sharedrepresents the shared way of compiling deflate, followed by the same parameters. If you have such an error in this step:
Error:mod_deflate have been repuested but can is built due to preerquisite falures
The solution is:
[email protected] httpd-2.2.31]# Yum install-y zlib-devel
To avoid errors in make, it is best to install some library files in advance.
Yum install-y pcre pcre-devel Apr ape-devel
[Email protected] httpd-2.2.31]#/configure \
>--prefix=/usr/local/apache2 \
>--WITH-INCLUDED-APR \
>--enable-so \
>--enable-deflate=shared \
>--enable-expires=shared \
>--enable-rewrite=shared \
>--with-pcre
5. Compiling
[[email protected] httpd-2.2.31]# make
6. Installation
Make install
This article is from the "Endless Sand rolling" blog, please be sure to keep this source http://loveemily.blog.51cto.com/6205266/1775247
Source code compile and install Apache