Compile and install apache+php (add frequently Asked Questions to resolve)

Source: Internet
Author: User

"Compiling Apache"
./configure--prefix=/usr/local/lamp/httpd-with-apr=/usr/local/apr-with-apr-util=/usr/local/apr-util-with-pcre= /usr/local/pcre
Make && make install

"Possible problems-missing APR or APR version incorrect (Apr, Apr-util, Pcre)"
Please download the latest Apr to http://archive.apache.org to compile the installation

compiling Apr
./configure--PREFIX=/USR/LOCAL/APR
Make && make install

Apr-util and Pcre are the same.


Compiling Apr-util
./configure--prefix=/usr/local/lamp/apr-util-with-apr=/usr/local/apr/bin/apr-1-config
Make && make install

Compile Pcre (can be downloaded to https://sourceforge.net/projects/pcre/files/)
./configure--prefix=/usr/local/pcre
Make && make install

If the above three things are all, compile Apache should be no problem!! (If you are prompted to do not have a C compiler, install GCC and gcc-c++ with Yum)

*************************************************************************************************************** ******************************

"Compile PHP (using./configure--hlep|grep Apache to view relevant configuration parameters)"
./configure--prefix=/usr/local/lamp/php-with-apxs2=/usr/local/lamp/httpd/bin/apxs
Make && make install

"Problems that may arise--lack of LIBXML2"
Using Yum to install LIBXML2, Libxml2-devel
Yum Install LIBXML2 Libxml2-devel

"Modify Apache Configuration"
Configuring the. php suffix Handler

AddType application/x-httpd-php. php


"It's done!" , if ID access is not Apache service, check the CentOS firewall configuration! 】

Compile and install apache+php (add frequently Asked Questions to resolve)

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.