1. Download
wget http://apache.fayea.com/apache-mirror//httpd/httpd-2.2.29.tar.gz
Tar zxvf httpd-2.2.29.tar.gz
CD httpd-2.2.29
./configure--PREFIX=/USR/LOCAL/HTTPD (You can also specify your own path)
Make && make install
/usr/local/httpd/bin/apachectl start
Register as a service
Cp/usr/local/httpd/bin/apachectl/etc/rc.d/init.d/httpd
Ln-s/etc/rc.d/init.d/httpd/etc/rc.d/rc3.d/s61httpd
This allows you to use sevice httpd to manage the
2. Modify the script to support Chkconfig
Edit the httpd script and add the following comment information on line 2nd:
# CHKCONFIG:35 61 61
# Description:apache
Save after execution: Chkconfig--add httpd
The 3 parameters for the first line are: at which RunLevel, start httpd (3,5), start sequence number (S61), and close ordinal (K61). Note: The above two lines are indispensable
Rc5.d links will appear in the RC3.D, s61httpd path in the future after executing chkconfig--add httpd, and k61httpd links will appear in the other run level paths
2.php Installation
wget http://cn2.php.net/get/php-5.3.29.tar.gz/from/this/mirrortar zxvf phpcd phpyum Install gd*./configure--prefix=/ usr/local/php--with-mysql=mysqlnd--with-mysqli=mysqlnd--with-pdo-mysql=mysqlnd--with-apxs2=/usr/local/httpd/ Bin/apxs--WITH-GD--enable-mbstring
Make && make install
cd/usr/local/php
Cp/usr/local/src/php-5.3.29/php.ini-development./lib/php.ini
Apache configuration file 311 left or right
AddType application/x-httpd-php. php. phtml
Plus the default index.php
CentOS Apache PHP Installation