编译安装PHP
wget http://cn2.php.net/distributions/php-5.4.12.tar.gz tar zvxf php-5.4.12.tar.gz yum install gcc gcc-c++ glibc glibc-devel glib2 glib2-devel autoconf libmcrypt-devel mhash-devel pcre-devel libjpeg-devel libpng-devel freetype-devel libXpm-devel.x86_64 gd.x86_64 libxml2-devel libidn-devel zlib-devel bzip2-devel ncurses-devel curl curl-devel krb5-devel openssl-devel mysql-devel libevent-devel.x86_64 libmemcached-devel.x86_64 libtool-ltdl-devel.x86_64 libicu-devel.x86_64
手动编译一下libmcrypt mhash mcrypt
wget http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz tar zvxf libmcrypt-2.5.8.tar.gz cd libmcrypt-2.5.8 ./configure make && make install cd ..
wget http://nchc.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz tar zvxf mhash-0.9.9.9.tar.gz cd mhash-0.9.9.9 ./configure make && make install cd ..
wget http://nchc.dl.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz tar zvxf mcrypt-2.6.8.tar.gz cd mcrypt-2.6.8 LD_LIBRARY_PATH=/usr/local/lib ./configure make && make install cd ..
编译php-5.4.12
./configure --prefix=/usr/local/php-5.4.12 --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-openssl --with-pcre-regex --with-zlib --enable-bcmath --with-bz2 --with-gd --with-mcrypt --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --with-mhash --with-curl --enable-intl --enable-mbstring --with-mysql --with-mysql-sock --with-mysqli --with-pdo-mysql --enable-shmop --enable-soap --enable-sockets --enable-zip --enable-calendar --enable-mysqlnd --with-pear make && make install
