Linux – 安装 php-memcached 扩展
     发布在:System      浏览:62      评论:0 条评论

PECL:https://pecl.php.net/package/memcached

GitHub:https://github.com/php-memcached-dev/php-memcached

下载

> cd /opt
> wget https://pecl.php.net/get/memcached-3.0.4.tgz

安装依赖

> yum -y install libmemcached libmemcached-devel zlib zlib-devel

安装 php-memcached

> pecl install memcached-3.0.4.tgz
# libmemcached directory [no] : 直接回车

根据提示修改 php.ini

You should add "extension=memcached.so" to php.ini

> vim /etc/php.d/memcached.ini
# ------------------------
; Enable memcached extension module
extension=memcached.so

重启 PHP-FPM

> systemctl reload php-fpm
Linux - 安装 php-memcached 扩展
    Responses