CentOS 7 Source Installation Apache

Source: Internet
Author: User

First, the official installation manual Http://httpd.apache.org/docs/2.4/install.html#customize

Download the latest version of Http://httpd.apache.org/download.cgi#apache24

httpd-2.4.27.tar.bz2

Unzip the tar xvf httpd-2.4.27.tar.bz2

CD httpd-2.4.27

Configure the directory for the./configure--prefix= installation path--WITH-APR and Apr-util

Compiling make

Install make install

Ii. Problems and Solutions

Problem a:configure:error:apr not found. Please read the documentation.

WORKAROUND: You need to install APR and Apr-util

Installation package Address: http://archive.apache.org/dist/apr/

Download apr-1.6.2.tar.bz2 and apr-util-1.6.0.tar.bz2

Unzip the tar xvf apr-1.6.2.tar.bz2

CD apr-1.6.2

Configure the installation path./configure--PREFIX=/USR/LOCAL/APR

Compile & install make && make install

Unzip the tar xvf apr-util-1.6.0.tar.bz2

CD apr-util-1.6.0

Configure the installation path./configure--prefix=/usr/local/apr-util--WITH-APR=/USR/LOCAL/APR

Compile & install make && make install

Problem b:xml/apr_xml.c:35:19: Fatal error: expat.h: No file or directory #include <expat.h>

Workaround: Missing Expat-devel Package

Yum Install Expat-devel

Problem c:configure:error:pcre-config for Libpcre not found. PCRE is required and available from http://pcre.org/

FIX: Install Pcre

Download pcre-8.41.tar.gz

Decompression pcre-8.41.tar.gz

CD pcre-8.41

Configure the installation path./configure--prefix=/usr/local/pcre

Compile & install make && make install

Issue D:make/usr/local/apr/-util/lib/libaprutil-1.so:undefined reference to ' Xml_geterrorcode ' during compilation

Resolution: I was just beginning to apr-util-1.6.0.tar.gz later changed to apr-util-1.6.0.tar.bz2 so that may be the problem of the package.

Can also be configured to need--with-expat=builtin, I tried but for my mistake is not good, later changed a package finally worked, wasted a long time.

Re-unzip with Apr-util-1.6.0.tar.bz2 again, back to Httpd-2.4.27,make clean

Configuration./configure--prefix=/usr/local/apache--with-pcre=/usr/local/pcre/--with-apr=/usr/local/apr/--with-apr-util=/ usr/local/apr-util/

Compile and install make && make install complete

CentOS 7 Source Installation 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.