tar xvf libevent-2.0.21-stable.tar.gz
cd libevent
./configure -prefix=/usr/local/libevent
make && make install


tar xvf memcached-1.4.25.tar.gz
cd memcached
./configure -prefix=/usr/local/memcached -with-libevent=/usr/local/libevent
make && make install


tar xvf libmemcached-1.0.18.tar.gz
cd libmemcached
./configure -prefix=/usr/local/libmemcached -with-memcached=/usr/local/memcached/bin/memcached
make && make install


启动 memcached
/usr/local/memcached/bin/memcached -d -m 50 -u root -p 11211 -c 256 -P /tmp/memcached.pid

 


tar xvf memcached-2.2.0.tgz //生成 memcached.SO 用 并不是memcached服务!
cd memcached-2.2.0
/usr/local/php/bin/phpize phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached --disable-memcached-sasl
make && make install


ls /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
有 memcached.so

 

vim php.ini

[Pdo]

extension=redis.so
extension=memcache.so
extension=memcached.so <-- 确保有这个

重启apache

 

posted on 2017-04-20 11:42  爱技术努力学技术  阅读(126)  评论(0编辑  收藏  举报