PHP7 安装 memcache
2020-04-07 18:29
951 查看
PHP版本:PHP 7.3.16
LINUX版本:7.6
安装成功的样子:
php -r "phpinfo();" | grep memcache memcache memcache support => enabled memcache.allow_failover => 1 => 1 memcache.chunk_size => 32768 => 32768 memcache.compress_threshold => 20000 => 20000 memcache.default_port => 11211 => 11211 memcache.hash_function => crc32 => crc32 memcache.hash_strategy => consistent => consistent memcache.lock_timeout => 15 => 15 memcache.max_failover_attempts => 20 => 20 memcache.prefix_host_key => 0 => 0 memcache.prefix_host_key_remove_subdomain => 0 => 0 memcache.prefix_host_key_remove_www => 1 => 1 memcache.prefix_static_key => no value => no value memcache.protocol => ascii => ascii memcache.redundancy => 1 => 1 memcache.session_prefix_host_key => 0 => 0 memcache.session_prefix_host_key_remove_subdomain => 0 => 0 memcache.session_prefix_host_key_remove_www => 1 => 1 memcache.session_prefix_static_key => no value => no value memcache.session_redundancy => 2 => 2 memcache.session_save_path => no value => no value
安装步骤:
# 下载 memcache 源码包 wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip # 解压缩 unzip NON_BLOCKING_IO_php7.zip # 进入解压后的目录 cd pecl-memcache-NON_BLOCKING_IO_php7/ # 生成配置文件 /usr/local/php/bin/phpize # 配置 ./configure --with-php-config=/usr/local/php/bin/php-config make make install # 在 php.ini 中添加扩展 extension=memcache # 重启服务 # 可以使用下面三种方式中的一种(具体看php的安装方式) service php-fpm restart kill -USR2 `cat /usr/local/php/var/run/php-fpm.pid` systemctl reload php-fpm
相关文章推荐
- php7安装redis,memcache
- PHP7安装Memcache+Memcached缓存加速WordPress教程
- PHP7.x环境下安装memcache和memcached扩展
- PHP7.x环境下安装memcache和memcached扩展
- php7安装redis扩展和memcache扩展
- php7 memcache扩展及其他扩展安装
- PHP7安装Memcache+Memcached缓存加速WordPress教程
- 解决php7安装memcache扩展问题
- Windows下安装php7的memcache扩展
- linux(ubuntu)安装PHP7以及memcache、redis等扩展
- 解决PHP7安装Memcache扩展问题
- linux上安装php7 memcache扩展 和 安装服务端memcached
- linux上安装php7 memcache扩展 和 安装服务端memcached
- linux系统安装php7的memcache扩展——linux安装web服务器10
- php7 安装 memcached ,memcache扩展
- 搭建LNAMP环境(七)- PHP7源码安装Memcached和Memcache拓展
- Centos 7.2 及php7环境下升级memcache未果,改安装 memcached
- 安装php7及安装memcache扩展出现的新旧php版本兼容扩展的问题
- window下安装php7的memcache扩展
- Linux下Memcache 安装和使用