惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
D
Docker
Blog — PlanetScale
Blog — PlanetScale
罗磊的独立博客
美团技术团队
V
V2EX
Last Week in AI
Last Week in AI
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Microsoft Security Blog
Microsoft Security Blog
Microsoft Azure Blog
Microsoft Azure Blog
人人都是产品经理
人人都是产品经理
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
B
Blog RSS Feed
博客园_首页
B
Blog
博客园 - 叶小钗
I
InfoQ
WordPress大学
WordPress大学
L
LangChain Blog
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
The Register - Security
The Register - Security
MyScale Blog
MyScale Blog
云风的 BLOG
云风的 BLOG
博客园 - 司徒正美
Latest news
Latest news
W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CERT Recently Published Vulnerability Notes
C
CXSECURITY Database RSS Feed - CXSecurity.com
Recent Commits to openclaw:main
Recent Commits to openclaw:main
N
News and Events Feed by Topic
S
Secure Thoughts
The Hacker News
The Hacker News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News

博客园 - 懒牛拉车

xxx tmp Thinkphp 3.2 Cookie丢失导致中英文混排 第一个python自动化实例 Nginx配置文件下载 每次用npm都很烦人 js 判断mac地址是否为组播地址 项目在本地时,css/js文件在浏览器刷新时,从(memory cache)读取,放服务器上就不会 模拟json_decode解析非法utf-8编码字符串 php socket 循环ping ip,显示能ping通的IP地址 thinkphp3.2.2 CheckLangBehavior.class中,使用session无效原因分析 Thikphp 3.2 session页面传递失败问题 火狐autocomplete="off"无效 testlink windows 安装笔记 宝塔面板部署thinkcmf问题 coreseek 測試用例 coreseek 基与Sphinx 的全文索引 centos6 nginx 配置本地https访问 centos6 nginx安装好以后,添加拓展ssl centos7 搭建 php7 + nginx (2) - 懒牛拉车 centos7 搭建 php7 + nginx (1)
centos6 php7 安装 memcache 和 memcached - 懒牛拉车
懒牛拉车 · 2019-11-05 · via 博客园 - 懒牛拉车
  • 下载安装memcache

注意:官网的memcache包,暂时好像不支持php7。所以到下面地址下载memcache包,切换到php7分支

php7 memcache github 下载地址

官网下载地址

# 下载
wget https://github.com/websupport-sk/pecl-memcache/archive/php7.zip

# 解压
unzip php7.zip

cd pecl-memcache-php7

# 编译
/usr/local/php7/bin/phpize
./configure  --with-php-config=/usr/local/php7/bin/php-config

# 安装
make
make install

# 生成memcache.so文件后,在php.ini文件添加
extension=memcache.so

# 重启php-fpm即可
  • 服务端安装memcached

# 安装
yum install memcached

启动
/usr/bin/memcached -d -m 256 -u root -p 11211 -c 1024 –P /tmp/memcached.pid
  • 安装memcached之前。先要安装libmemcached

直接yum安装的,在安装memcached的时候,会导致出错。具体原因不知道。可能还是php7的原因
yum install libmemcached libmemcached-devel
libmemcached源码包

# 安装依赖
yum install install gcc+ gcc-c++

# 下载
wget  https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz


# 解压
tar -zxvf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18

# 编译
./configure --prefix=/usr/local/libmemcached --with-memcached

# 安装
make
make install

  • 客户端安装memcached

注意:和memcache一样,官网的memcachde包,暂时好像不支持php7。所以到下面地址下载memcached包,切换到php7分支
github下载地址
官网memcached下载地址

# 下载memcached
wget  https://github.com/php-memcached-dev/php-memcached/archive/php7.zip

# 解压
unzip php7.zip
cd php-memcached-php7

# 编译
/usr/local/php7/bin/phpize
./configure  --with-php-config=/usr/local/php7/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached/ --disable-memcached-sasl


# 安装
make
make install

# php.ini 添加拓展。重启php-fpm生效
extension=memcached.so