Source code compile and install Apache

Source: Internet
Author: User

  1. Download


    [Email protected] ~]# CD/USR/LOCAL/SRC

    [Email protected] src]# wget http://mirrors.sohu.com/apache/httpd-2.2.31.tar.gz

  2. Extract

    Tar zxvf httpd-2.2.31.tar.gz

  3. 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

  4. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.