关于编译安装php的选项可以为

./configure--prefix=/usr/local/php--with-mysql=mysqlnd--with-pdo-mysql=mysqlnd--with-mysqli=mysqlnd--with-iconv--with-openssl--enable-mbstring--with-freetype-dir--with-jpeg-dir--with-png-dir--with-libxml-dir=/usr/--enable-xml--enable-sockets--enable-fpm--with-config-file-path=/etc/--with-config-file-scan-dir=/etc/php.d--with-bz2--with-curl--with-mhash--with-mcrypt--enable-intl--with-gd--enable-gd-native-ttf--enable-shmop

需要安装memcache需要编译libmemcache

libmemcached的下载地址为https://launchpad.net/libmemcached

编译安装

wgettarxflibmemcached-1.0.18.tar.gzcdlibmemcached-1.0.18.tar.gz./configuremake&&makeinstall

扩展memcache模块

memcached的模块地址为http://pecl.php.net/package/memcache

编译安装

http://pecl.php.net/get/memcache-3.0.8.tgz

tarxfmemcache-3.0.8.tgzcdmemcache-3.0.8进入解压以后的目录,是没有configure文件的,需要执行/usr/local/php/bin/phpize./configure--with-php-config=/usr/local/php/bin/php-configmake&&makeinstall

编辑php.ini文件,在里面添加以下行

extension=memcache.so

redis的模块添加与memcached的一样

redis的下载地址为http://pecl.php.net/package/redis

编译完成后同样需要添加extesion文件

本文以及验证通过,此处不在给出验证结果