• PHP下安装memcached


    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

  • 相关阅读:
    electron中使用vue.js
    大三上学期学期总结
    小程序 弹窗的提示文字中添加链接
    03月14日总结
    03月16日总结
    03月10日总结
    03月11日总结
    03月19日总结
    03月17日总结
    03月15日总结
  • 原文地址:https://www.cnblogs.com/lhlucky/p/6737916.html
Copyright © 2020-2023  润新知