PHP7 安装 Memcached
2020-04-07 22:03
881 查看
PHP版本:PHP 7.3.16
LINUX版本:7.6
安装成功的样子:
php -r "phpinfo();" | grep memcached memcached memcached support => enabled libmemcached version => 1.0.16 memcached.compression_factor => 1.3 => 1.3 memcached.compression_threshold => 2000 => 2000 memcached.compression_type => fastlz => fastlz memcached.default_binary_protocol => Off => Off memcached.default_connect_timeout => 0 => 0 memcached.default_consistent_hash => Off => Off memcached.serializer => php => php memcached.sess_binary_protocol => Off => Off memcached.sess_connect_timeout => 0 => 0 memcached.sess_consistent_hash => On => On memcached.sess_consistent_hash_type => ketama => ketama memcached.sess_lock_expire => 0 => 0 memcached.sess_lock_max_wait => not set => not set memcached.sess_lock_retries => 5 => 5 memcached.sess_lock_wait => not set => not set memcached.sess_lock_wait_max => 150 => 150 memcached.sess_lock_wait_min => 150 => 150 memcached.sess_locking => On => On memcached.sess_number_of_replicas => 0 => 0 memcached.sess_persistent => Off => Off memcached.sess_prefix => memc.sess.key. => memc.sess.key. memcached.sess_randomize_replica_read => Off => Off memcached.sess_remove_failed_servers => Off => Off memcached.sess_sasl_password => no value => no value memcached.sess_sasl_username => no value => no value memcached.sess_server_failure_limit => 0 => 0 memcached.store_retry_count => 2 => 2 Registered save handlers => files user memcache memcached
安装步骤:
# 首先需要安装libmemcached库 yum -y install libmemcached libmemcached-devel # 下载memcached扩展,两个地址任选一 wget https://github.com/php-memcached-dev/php-memcached/archive/php7.zip wget https://pecl.php.net/get/memcached-3.1.3.tgz # 解压 unzip php7.zip or tar zxvf memcached-3.1.3.tgz # 进入到解压后目录 # 准备安装 export PHP_AUTOCONF=/usr/bin/autoconf export PHP_PREFIX=/opt/php /usr/local/php/bin/phpize # 配置 ./configure --with-php-config=/opt/php/bin/php-config make make install # 在php.ini中添加memcached扩展 extension=memcached.so # 可以使用下面二种方式中的一种(具体看php的安装方式) service php-fpm restart systemctl reload php-fpm
相关文章推荐
- ubantu上安装PHP7的memcached扩展
- linux下php7安装memcached、redis扩展
- linux上安装php7 memcache扩展 和 安装服务端memcached
- centos 安装php7 memcached扩展
- PHP7安装Memcache+Memcached缓存加速WordPress教程
- linux下php7安装memcached、redis扩展
- LNMP环境PHP7 memcached扩展安装
- mac下为php7安装memcached扩展
- CentOS7 编译安装Memcached、设置自启动、php7编译安装Memcached
- 248 php7,ubuntu16.04扩展安装 redis,memcached,yar,rdkafka
- php7安装Memcached扩展
- linux下php7安装memcached、redis扩展
- 搭建LNAMP环境(七)- PHP7源码安装Memcached和Memcache拓展
- PHP7安装Memcache+Memcached缓存加速WordPress教程
- Centos 7.2 及php7环境下升级memcache未果,改安装 memcached
- Ubuntu 下安装 PHP7 扩展 Memcached
- php7 安装 memcached ,memcache扩展
- window下安装php7的memcached扩展
- linux上安装php7 memcache扩展 和 安装服务端memcached
- PHP7.x环境下安装memcache和memcached扩展