wget http://download.tangent.org/libmemcached-0.48.tar.gz
tar zxf libmemcached-0.48.tar.gz
cd libmemcached-0.48
./configure --prefix=/usr/local/libmemcached --with-memcached
make
make install
wget http://pecl.php.net/get/memcached-1.0.2.tgz
tar zxf memcached-1.0.2.tgz
cd memcached-1.0.2
/usr/local/webserver/php/bin/phpize
./configure --enable-memcached --with-php-config=/usr/local/webserver/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached
make
make install
在php.ini中到场
extension=memcached.so
完成
另:
在装置libmemcached时,假如只用./configure,能够会提醒:
checking for memcached… no
configure: error: “could not find memcached binary”