Linux 下 安装 php-memcached 扩展
in Linux with 0 comment, Views is 104

Linux 下 安装 php-memcached 扩展

in Linux with 0 comment, Views is 104

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

1.png

Responses
选择表情