"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)