## Basic
yum install gcc libtool make automake autoconf curl-devel gd-devel openssl-devel gcc-c++ libmcrypt-devel libevent-devel posgresql-devel cronolog libtool-ltdl-devel
## Apache apr
wget http://ftp.twaren.net/Unix/Web/apache//apr/apr-1.4.8.tar.gz
tar xf apr-1.4.8.tar.gz
cd apr-1.4.8
./configure
make ; make install
## Apache apr-util
wget http://archive.apache.org/dist/apr/apr-util-1.5.2.tar.gz
tar xf apr-util-1.5.2.tar.gz
cd apr-util-1.5.2
./configure --with-apr=/usr/local/apr/bin/apr-1-config
make ; make install
wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.33/pcre-8.33.zip
unzip pcre-8.33.zip
cd pcre-8.33
./configure
make ; make install
## Apache
wget http://archive.apache.org/dist/httpd/httpd-2.4.6.tar.gz
tar xf httpd-2.4.6.tar.gz
cd httpd-2.4.6
./configure --prefix=/usr/local/apache2
make ; make install
## PHP 5.5.4
yum -y install libxml2 libxml2-devel
wget http://tw2.php.net/get/php-5.5.4.tar.gz/from/this/mirror
tar -xf php-5.5.4.tar.gz
cd php-5.5.4
./configure --prefix=/usr/local/apache2/php
make ; make install
##
cd /usr/local/bin ; ln -s /usr/local/apache2/php/bin/php ; ln -s /usr/local/apache2/php/bin/phpize ; ln -s /usr/local/apache2/php/bin/php-config
touch /usr/local/apache2/conf/php.ini
##
echo "AddType application/x-httpd-php .php" >> /usr/local/apache2/conf/httpd.conf
echo "AddType application/x-httpd-php-source .phps" >> /usr/local/apache2/conf/httpd.conf