安装php的memcached模块和扩展支持sasl
memcached的1.2.4及以上增加了CAS(Check and Set)协议,对于同一key的多进行程的并发处理问题。这种情况其实根数据库很像,如果同时有几个进程对同一个表的同一数据进行更新的话,那会不会打架呢,哈哈。数据库里面可以锁定整张表,也可以锁定表里面一 行的功能,其实memcached加入的CAS根这个差不多。
php的扩展memcache,不支持cas,所以我们要装memcached扩展,memcached扩展是基于libmemcached,所以要先安装libmemcached
tar
zxvf libmemcached-0.42.tar.gz
cd libmemcached-0.42
./configure
--prefix=/usr/local/libmemcached --with-memcached --enable-sasl
make && make install
tar
zxvf memcached-1.0.2.tar.gz
cd memcached-1.0.2
/usr/local/php/bin/phpize
./configure --enable-memcached
--with-php-config=/usr/local/php/bin/php-config
--with-libmemcached-dir=/usr/local/libmemcached --enable-memcached-sasl
make
&& make install
vi
/usr/local/php/lib/php.ini
加上extension=memcached.so重起一下服务就可以了。
------------------------------------------------------------
【centosphp安装memcached扩展支持sasl】
【http://www.2cto.com/os/201411/353283.html】
1.安装sasl
|
1 2 |
|
2.下载libmemcached
|
1 |
|
3,编译安装
|
1 2 3 4 5 |
|
4.安装memcached安装
|
1 2 3 |
|
|
1 |
|
phpize./configure
--with-php-config=php-config目录
--with-libmemcached-dir=/usr/local/libmemcached/ --enable-memcached-sasl
|
1 |
|
1 |
|
|
1 |
|
5.修改对应的配置
增加
|
1 |
|
|
1 2 |
|
最后 重启web服务器 nginx 或者
apache
|
1 2 3 |
|
|
1 |
|
安装php的memcached模块和扩展支持sasl的更多相关文章
- centos php 安装memcached 扩展 支持sasl
1.安装sasl yum install cyrus-sasl-lib.x86_64 yum install cyrus-sasl-devel.x86_64 2.下载libmemcached wget ...
- PHP7 下安装 memcache 和 memcached 扩展
转载自:https://www.jianshu.com/p/c06051207f6e Memcached 是高性能的分布式内存缓存服务器,而PHP memcache 和 memcached 都是 Me ...
- linux下php7安装memcached、redis扩展
linux下php7安装memcached.redis扩展 1.php7安装Memcached扩展 比如说我现在使用了最新的 Ubuntu 16.04,虽然内置了 PHP 7 源,但 memcache ...
- php的Memcached模块扩展
Memcached模块介绍 Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提供动态. ...
- php7安装memcache 和 memcached 扩展
php7安装memcache 和 memcached 扩展 标签(空格分隔): php memcache和memcached区别 memcache:http://pecl.php.net/packag ...
- linux上安装php7 memcache扩展 和 安装服务端memcached
linux上安装memcached不算太困难.唯一让本人感到困难的是 php7的memcache扩展安装.真的蛋疼! 先说安装服务端 memcached 1. 首先安装Libevent事件触发管理器. ...
- centos6下安装php7的memcached扩展
安装php7的memcached扩展 .编译安装libmemcached- wget https://launchpadlibrarian.net/165454254/libmemcached-1.0 ...
- 问题 Windows7VMware14安装虚拟机时出现 此主机不支持虚拟化实际模式。需要具备 Intel“VMX 不受限客户机”功能才能在 Intel 处理器上运行此虚拟机。 模块“CPUIDEarly”启动失败。
问题 Windows7VMware14安装虚拟机时出现 此主机不支持虚拟化实际模式.需要具备 Intel“VMX 不受限客户机”功能才能在 Intel 处理器上运行此虚拟机. 模块“CPUIDEarl ...
- linux下给php安装memcached及memcache扩展(转)
http://kimi.it/257.html (另外的方法)linux安装memcached及memcache扩展一.安装libevent函数库下载地址:http://libevent.org默认被 ...
随机推荐
- CCF系列之图像旋转(201503-1)
试题编号: 201503-1时间限制: 5.0s 内存限制: 256.0MB 问题描述 旋转是图像处理的基本操作,在这个问题中,你需要将一个图像逆时针旋转90度. 计算机中的图像表示可以用一个矩阵来表 ...
- mybatis配置多个数据源事务(Transaction)处理
当mybatis配置文件中只有一个数据源的时候,按照正常的事务注解形式@Transaction是没有问题的,但是当配置文件中有多个数据源的时候发现事务不起作用了,怎么解决这个问题呢?看下面的案例:
- 解决eclipse maven工程中src/main/resources目录下创建的文件夹所显示样式不是文件夹,而是"包"图标样式的问题
参考:http://blog.csdn.net/luwei42768/article/details/72268246 eclipse项目中创建maven项目后,有时在执行命令maven update ...
- git 不成功
fatal: Interactive git shell is not enabled.hint: ~/git-shell-commands should exist and have read an ...
- struts2.xml的配置问题
1.<package namespace="/"></package> namespace决定访问action的路径: 如果省略,将代表任意路径: 2.&l ...
- Android webView包装WebAPP
前言 Android webView 兼容体验真的差到了极点!! 前一阵子,老板要讲 WebAPP 放到 Android 和 iOS 里面,而我因为以前做过安卓,所以这方面就由我来打包, 原理是很简单 ...
- docker挂载NVIDIA显卡运行pytorch
本文为作者原创,转载请注明出处(http://www.cnblogs.com/mar-q/)by 负赑屃 写在前面: 请参考之前的文章安装好CentOS.NVIDIA相关驱动及软件.docker及 ...
- sed运用
流编辑器sed sed简介 sed是stream editor的缩写,一种流编辑器,它一次处理一行内容.处理时,把当前处理的行存储在临时缓冲区中,称为"模式空间"(pattern ...
- chrome disable-web-security 关闭安全策略 解决跨域
Chrome 跨域访问线上接口 时间:2016-04-21 作者:zhongxia 前后端分离之后,联调的时候就会出现问题,那就是Ajax跨域问题. 跨域问题的解决方案有很多种比如常规的 后端使用CR ...
- C程序结构
从程序流程的角度来看,C语言中的语句可以分为3种基本结构:顺序结构.分支结构和循环结构. ① 顺序结构的执行过程如图5-1所示.在这种结构中,程序会顺序执行各条语句. ② 分支结构的执行过程如图5-2 ...