一、memcache.so 的安装
wget http://pecl.php.net/get/memcache-2.2.7.tgz
tar zxvf memcache-2.2.7.tgz
./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir
make
make install
二、memcached.so 的安装
1.安装libmemcached-0.42.tar.gz
sudo wget http://launchpad.net/libmemcached/1.0/0.42/+download/libmemcached-0.42.tar.gz
sudo tar zxvf libmemcached-0.42.tar.gz
cd libmemcached-0.42
sudo ./configure -prefix=/usr/local/libmemcached --with-memcached
sudo make
sudo make install
2.安装Memcached
sudo wget http://pecl.php.net/get/memcached-1.0.2.tgz
cd memcached-1.0.2
sudo /usr/local/php/bin/phpize
sudo ./configure --with-libmemcached-dir=/usr/local/libmemcached -with-memcached
sudo make
sudo make install