基于libmemcached的memcached的安装

所需软件包

libmemcached-1.0.9 https://launchpad.net/libmemcached/1.0/1.0.9/+download/libmemcached-1.0.9.tar.gz

memcached-2.1.0 http://pecl.php.net/get/memcached-2.1.0.tgz (注意上一版本即memcached-2.0.1.tgz 这个包有bug)

1>下载libmemcached

2>tar -zxvf libmemcached-0.48.tar.gz

3> cd libmemcached-0.48.tar.gz

4>./configure –with-memcached //如果不加–with-memcached,会提示你checking for memcached… no configure:could not find memcached binary

5>make && make install

安装memcached

tar zxvf memcached-1.0.2.tar.gz

cd memcached-1.0.2

/usr/local/lamp/php/bin/phpize

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

make && make install

vi /etc/php.ini

加上extension=memcached.so

重起一下服务就可以了。

 

原文地址:http://u.sanwen.net/subject/242335.html

可参考:http://cn.php.net/manual/zh/memcached.installation.php

博主注:上面的方法,Memcached扩展无法安装成功,需要添加–disable-memcached-sasl,如下:

./configure –enable-memcached –with-php-config=/usr/local/lamp/php/bin/php-config –with-libmemcached-dir=/usr/local/lamp/libmemcached –disable-memcached-sasl

    原文作者:memcached
    原文地址: https://www.cnblogs.com/ddcoder/articles/5037447.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞