1, the preparation work, installs the dependence.
Yum install make apr* autoconf automake gcc gcc-c++ zlib-devel OpenSSL openssl-devel pcre-devel gd kernel keyutils patch Perl kernel-headers compat* MPFR cpp glibc libgomp libstdc++-devel ppl cloog-ppl keyutils-libs-devel libcom_err-devel li Bsepol-devel libselinux-devel krb5-devel zlib-devel libxpm* freetype libjpeg* libpng* php-common php-gd ncurses* libtool* LIBXML2 libxml2-devel Patch
2. Download Apache
wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.12.tar.gz
Apache relies on Apr
wget http://mirror.bit.edu.cn/apache/apr/apr-1.5.2.tar.gz
wget http://mirror.bit.edu.cn/apache/apr/apr-util-1.5.4.tar.gz
Unzip, and then perform a little action.
MV apr-1.5.2 HTTPD-2.4.12/SRCLIB/APRMV apr-util-1.5.4 HTTPD-2.4.12/SRCLIB/APR-UTILCD httpd-2.4.12
3. Download PHP 5.3.29
wget http://cn2.php.net/distributions/php-5.3.29.tar.gz
PHP requires Libmcrypt, install the following
Ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt
http://mhash.sourceforge.net/
./configure--PREFIX=/USR/LOCAL/PHP5--with-config-file-path=/usr/local/php5/etc--with-apxs2=/usr/local/apache2/ Bin/apxs--with-iconv--with-freetype--with-jpeg--with-png--with-zlib--with-libxml--enable-xml-- Enable-discard-path--enable-magic-quotes--enable-safe-mode--enable-bcmath--enable-shmop--enable-sysvsem-- Enable-inline-optimization--with-curlwrappers--enable-mbregex--enable-fastcgi--enable-force-cgi-redirect-- Enable-mbstring--enable-ftp--enable-gd-native-ttf--with-openssl--enable-pcntl--enable-sockets--with-xmlrpc-- Enable-zip--enable-soap--without-pear--with-gettext--with-mime-magic--enable-suhosin--enable-session-- With-mcrypt
Reference site:
1, http://www.osyunwei.com/archives/2696.html
2, http://www.onepx.com/centos-apache-246.html
Centos 6 Installation Apache 2.4