您的位置:首页 > 数据库 > Memcache

php memcached扩展 安装笔记

2014-05-27 10:44 429 查看
php memcached扩展 安装笔记

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/php/bin/phpize

./configure --enable-memcached --with-php-config=/usr/local/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached

make

make install

安装成功提示:

Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/

 

 

在php.ini中加入

extension=memcached.so

完成

另:

在安装libmemcached时,如果只用./configure,可能会提示:

checking for memcached… no

configure: error: “could not find memcached binary”

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息