美文网首页
linux安装memcache php5.4

linux安装memcache php5.4

作者: 第五季资源 | 来源:发表于2017-11-16 09:03 被阅读0次

    参考其他网友,安装测试可用:

    1.安装libevent

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~] wget http://www.monkey.org/~provos/libevent-2.0.12-stable.tar.gz

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~] tar zxf libevent-2.0.12-stable.tar.gz

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~] cd libevent-2.0.12-stable

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~]./configure  --prefix=/usr/local/lib

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~] make && make install

    2.安装Memcached

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~] wget http://memcached.org/files/memcached-1.5.0.tar.gz

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~] tar zxf memcached-1.5.0.tar.gz

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~] cd memcached-1.5.0

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~]./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/lib

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~] make && make install

    3.启用memcached

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~] /usr/local/memcached/bin/memcached -u root -d

    4.安装php-memcache扩展

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~] wget http://pecl.php.net/get/memcache-3.0.6.tgz

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~] tar zxvf memcache-3.0.6.tgz

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~] cd memcache-3.0.6

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~]/www/server/php/54/bin/phpize  #php对应的编译

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~]./configure --enable-memcache --with-php-config=/www/server/php/54/bin/php-config --with-zlib-dir

    [root@iZ2ze3nu0s9j3yqfu9qsh5Z ~]make && make install

    5.在php.ini中添加

    extension=memcache.so

    6.重启php 

    相关文章

      网友评论

          本文标题:linux安装memcache php5.4

          本文链接:https://www.haomeiwen.com/subject/vurkvxtx.html