memcached 扩展安装

来源:转载

安装环境:CentOS 7


PHP的扩展memcache,不支持cas,所以我们要装memcached扩展,memcached扩展是基于libmemcached,所以要先安装libmemcached


php-memcached下载地址:


http://pecl.php.net/package/memcached,根据需要,下载对应的版本


(例如:wget http://pecl.php.net/get/memcached-2.2.0.tgz)


libmemcached下载地址:


https://launchpad.net/libmemcached/+download,根据需要,下载对应的版本


(例如:wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz)


# 第一步安装libmemcached :


tar xzf libmemcached-1.0.18.tar.gz


cd libmemcached-1.0.18


./configure


make


sudo make install

# 第二步安装igbinary :


yum install php-pecl-igbinary-devel -y

# 第三步安装memcached :


tar xzf memcached-3.0.3.tgz


cd memcached-3.0.3


phpize


php-config


./configure --disable-memcached-sasl --enable-memcached-igbinary


make


sudo make install


#第四步重启php服务


service php-fpm restart


分享给朋友:
您可能感兴趣的文章:
随机阅读: