版本:php-5.4.13
编译环境

yuminstallautoconfautomakelibtoolcurl-devellibjpeg-devellibpng-develfreetype-develgdgd-develglibcglibc-common-y

编译安装ncurses-5.9.tar.gz、openssl-1.0.1e.tar.gz、zlib-1.2.7.tar.gz 、libmcrypt-2.5.7.tar.gz、php-5.4.13.tar.gz

tarzxvfncurses-5.9.tar.gzcdncurses-5.9./configuregmake&&gmakeinstall

tarzxvfopenssl-1.0.1e.tar.gzcdopenssl-1.0.1e./confg--prefix=/usr/local/sslsharedzlib-dynamicenable-camelliamake&&makeinstallecho"/usr/local/ssl/lib/">/etc/ld.so.conf.d/usr_local_ssl_lib.conf

tarzxvfzlib-1.2.7.tar.gzcdzlib-1.2.7./configure--prefix=/usr/local/zlibmake&&makeinstall

tarzxvflibmcrypt-2.5.7.tar.gzcdlibmcrypt-2.5.7./configuremake&&makeinstallcdlibltdl/./configure--enable-ltdl-installmake&&makeinstall/sbin/ldconfig

tarzxvfphp-5.4.13.tar.gzcdphp-5.4.13./configure--prefix=/usr/local/php\#指定位置#--with-apxs2=/usr/local/apache2/bin/apxs\#以apache做解析开启--with-mysql=/usr/local/mysql\#mysql安装位置--with-pdo-mysql=/usr/local/mysql/bin/mysql_config\--with-mysqli=/usr/local/mysql/bin/mysql_config\--with-config-file-path=/etc\配置文件路径--disable-debug\--enable-cgi\--enable-fastcgi\--disable-short-tags\--with-openssl=/usr/local/ssl\--with-zlib=/usr/local/zlib\--enable-bcmath\--enable-calendar\--enable-dba\--with-pcre-dir\--enable-ftp\--enable-json\--with-mcrypt\--with-freetype-dir\--with-jpeg-dir\--with-png-dir\--with-ttf\--enable-xml\--enable-zip\--enable-fpm\#开启fpm,以nginx等静态服务器解析开启--with-gd\--enable-discard-path\--enable-safe-mode\--enable-shmop\--enable-sysvsem\--with-curl\#64位去掉--with-curlwrappers\#64位去掉--enable-mbregex\--enable-force-cgi-redirect\--enable-mbstring\--enable-dbx--enable-sockets\--enable-soap\--with-ncurses\--with-pear\--enable-zend-multibytemake&&makeinstallmv/etc/php.ini/etc/php.ini.bakcpphp.ini-production/etc/php.inicpsapi/fpm/init.d.php-fpm/etc/rc.d/init.d/php-fpmchmod755/etc/rc.d/init.d/php-fpm#支持静态服务器解析php