Centos compilation and installation apache2.4.10

Source: Internet
Author: User

1. Prepare the compiling environment

Yum-y install GCC make cmake Autoconf libtool libevent

Install a required dependency package for Apache

Yum-y install Apr-util apr pcre-devel

2. download the software package

Wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.4.10.tar.gz

Decompress the package:

Tar-xzf httpd-2.4.10.tar.gz

3. Compile and install Apache. For Apache versions earlier than 2.x, follow these steps)

  ./configure --prefix=/usr/local/httpd  make  make install

Notes:

Error message:
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/    
Solution: Execute Yum-y install PCRE-devel to solve this error.
Error message:
     
checking for APR... noconfigure: error: APR not found .  Please read the documentation.

Solution:
Download the latest version of the APR installation file:
      
Wget http://mirror.atlanticmetro.net/apache//apr/apr-1.4.6.tar.gz wget http://mirror.atlanticmetro.net/apache//apr/apr-util-1.4.1.tar.gz tar xvfz apr-1.4.6.tar.gz tar xvfz apr-util-1.4.1.tar.gz
MV apr-1.4.6 httpd-2.4.2/srclib/APR (note this directory for your own Apache installation file directory)
MV apr-util-1.4.1 httpd-2.4.2/srclib/APR-UTI

Run the following command to re-compile:

   ./configure --prefix=/usr/local/httpd --with-included-apr
  make
  make install

      

 


  

Centos compilation and installation apache2.4.10

Related Article

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.