zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    滚动条滚动方向
    阶乘函数-尾递归
    返回顶部
    CommonJS
    vuessr
    随机字符串
    indexedDB
    深层次选择器
    Vue3.0简单替代Vuex
    shell 学习笔记
  • 原文地址:https://www.cnblogs.com/lhlucky/p/6737916.html
Copyright © 2011-2022 走看看