linux php7 安装memcached扩展

cd /usr/local/php/ext/ (自己的PHP安装目录)
git clone https://github.com/php-memcached-dev/php-memcached memcached
cd memcached/git checkout php7 (切换到php7分支)
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config \--with-libmemcached-dir=/usr/local/libmemcached --disable-memcached-sasl
注释 : /usr/local/libmemcached 是安装memcached客户端的地址 ,如果没有先安装
make && make install
------Installing shared extensions:     /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/
------ls /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/ (查看so文件)
vim /usr/local/php/etc/php.ini 加入:extension=memcached.so
service php-fpm restart

发表评论

电子邮件地址不会被公开。 必填项已用*标注