CentOS-6.4 安装 PHP Memcached 扩展
1、获取安装文件包
[root@phpdragon home]# wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
[root@phpdragon home]# wget https://pecl.php.net/get/memcached-2.2.0.tgz
2、安装前编译环境的准备
[root@phpdragon home]# yum install gcc
[root@phpdragon home]# yum install gcc-c++
[root@phpdragon home]# yum install zlib
[root@phpdragon home]# yum install zlib-devel
3、安装libmemcached
[root@phpdragon home]# tar -zxvf libmemcached-1.0..tar.gz
[root@phpdragon home]# cd libmemcached-1.0.
[root@phpdragon libmemcached-1.0.]# whereis memcached //获取memcached的安装目录
memcached: /usr/local/bin/memcached [root@phpdragon home]# ./configure -prefix=/usr/local/libmemcached -with-memcached=/usr/local/bin/memcached
[root@phpdragon libmemcached-1.0.]# make && make install [root@phpdragon libmemcached-1.0.]# whereis libmemcached //获取libmemcached的安装目录
libmemcached: /usr/local/libmemcached
4、安装php-memcached
[root@phpdragon home]# tar -zxvf php_memcached-2.2.0.tgz
[root@phpdragon home]# cd memcached-2.2.0/
[root@phpdragon memcached-2.2.0]# phpize //显示没有安装phpize
-bash: phpize: command not found
[root@phpdragon memcached-2.2.0]# yum install php-devel //安装phpize
[root@phpdragon memcached-2.2.0]# phpize
[root@phpdragon memcached-2.2.0]# ./configure --with-php-config=/usr/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached --disable-memcached-sasl
Installing shared extensions: /usr/lib64/php/modules/
vi /etc/php.d/memcached.ini 保存退出
; ----- Enable memcache extension module
extension=memcached.so ; ----- Options for the memcache module ; Whether to transparently failover to other servers on errors
;memcache.allow_failover=1
; Data will be transferred in chunks of this size
;memcache.chunk_size=32768
; Autocompress large data
;memcache.compress_threshold=20000
; The default TCP port number to use when connecting to the memcached server
;memcache.default_port=11211
; Hash function {crc32, fnv}
;memcache.hash_function=crc32
; Hash strategy {standard, consistent}
;memcache.hash_strategy=consistent
; Defines how many servers to try when setting and getting data.
;memcache.max_failover_attempts=20
; The protocol {ascii, binary} : You need a memcached >= 1.3.0 to use the binary protocol
; The binary protocol results in less traffic and is more efficient
;memcache.protocol=ascii
; Redundancy : When enabled the client sends requests to N servers in parallel
;memcache.redundancy=1
;memcache.session_redundancy=2
; Lock Timeout
;memcache.lock_timeout = 15 ; ----- Options to use the memcache session handler ; Use memcache as a session handler
;session.save_handler=memcache
; Defines a comma separated of server urls to use for session storage
;session.save_path="tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15"
重启PHP-fpm
[root@phpdragon home]# service php-fpm start
CentOS-6.4 安装 PHP Memcached 扩展的更多相关文章
- CentOS 6.6 安装 PHP Memcached 扩展
PHP 的 Memcached扩展使用了 libmemcached 库提供的 api 与 memcached 服务端进行交互.它同样提供了一个 session 处理器(memcached). PHP ...
- centos 安装php7 memcached扩展
在使用下面这种方式安装php7 memcached扩展时,先要安装好memcached服务器yum -y install php70w-pecl-memcached
- 安装PHP memcached扩展
引用 pecl.php.net有两个memcache扩展: memcache memcached extension memcached PHP extension for interfacing ...
- linux centos系统 php安装GD库扩展
yum --enablerepo=remi-php56 install php-gd php-mysql php-mbstring php-xml php-mcrypt //安装GD库扩展 servi ...
- Cent OS 6.5安装 php memcached扩展
首先查看memcache的依赖库是否有安装,如果对这个有疑问可以参考php手册的memcache的安装需求说明 命令如下: 查询: rpm -qa | grep libevent 安装:yum -y ...
- centos 6.5 安装php redis 扩展
一.安装: 其中,添加PHP扩展需要用到 phpize,所以我们需要安装 php-devel 这个包. #yum install php-devel 然后编译安装phpredis: #git clon ...
- Centos 下php安装配置xdebug扩展
2018年05月02日 19:54:42 杨汉松 阅读数:44 1.下载安装xdebug 获取xdebug wget http://www.xdebug.org/files/xdebug-2.3. ...
- (转发)centos,redhat 系统为php安装memcached扩展
转自:http://www.itnose.net/detail/6111623.html 1. 通过yum安装 yum -y install memcached #安装完成后执行: memcached ...
- centos系统为php安装memcached扩展
1. 通过yum安装 yum -y install memcached #安装完成后执行: memcached -h #出现memcached帮助信息说明安装成功 2. 加入启动服务 chkconfi ...
随机推荐
- SpringBoot 无法显示html文件 找不到html文件 如果显示html文件
两种情况: 1.如果使用了 thymeleaf 模板引擎,html文件可以放在 template文件夹中,如果不是一定不要放进去,否则找不到,因为html是静态页面,所以放在把此类文件放在了stati ...
- 解救小哈——DFS算法举例
一.问题引入 有一天,小哈一个人去玩迷宫.但是方向感不好的小哈很快就迷路了.小哼得知后便去解救无助的小哈.此时的小哼已经弄清楚了迷宫的地图,现在小哼要以最快的速度去解救小哈.那么,问题来了... 二. ...
- 阿里技术嘉年华-aDev内容感悟
之前参见了ADC然后要求在组内做了个简单的分享,因为写这个PPT的时候ADC的资料还没分享,所以仅凭自己记忆写的一点感悟罢了. PPT下载
- Java数组填充和初始化
Java中,如何填充(一次初始化)数组? 示例 此示例使用Java Util类的Array.fill(arrayname,value)方法和Array.fill(arrayname,starting ...
- Java的图形用户界面的基本工具
AWT(Abstract Window Toolkit),中文译为抽象窗口工具包,该包提供了一套与本地图形界面进行交互的接口,是Java提供的用来建立和设置Java的图形用户界面的基本工具. AWT中 ...
- (原)hisi3531立体声pcm实现播放方式
版权声明:本文为博主原创文章,未经博主允许不得转载(http://www.cnblogs.com/lihaiping/p/5251854.html) 最近在使用hisi3531做一个项目,需要实现本地 ...
- 初步了解学习将传统单机应用改造成Dubbo服务的过程
Dubbo作为RPC框架,实现的效果就是调用远程的方法就像在本地调用一样.如何做到呢?就是本地有对远程方法的描述,包括方法名.参数.返回值,在Dubbo中是远程和本地使用同样的接口:然后呢,要有对网络 ...
- (资源)OpenStack IRC资源
OpenStack的IRC频道列表 如何在浏览器上进入OpenStack的频道(具体的频道可以参考前面的频道列表) 频道聊天日志和会议日志 这里我使用mIRC而不是浏览器接入IRC,OpenStack ...
- Shell脚本中的export
shell 与 export命令 用户登录到Linux系统后,系统将启动一个用户shell.在这个shell中,可以使用shell命令 或声明变量,也可以创建并运行shell脚本程序.运行shell脚 ...
- 安装drools workbench
从drools官网下载tomcat7版本的Drools Tomcat 7+ WAR, Workbench,实际就是一个war包,需要严格按照里面的readme的要求,配置好tomcat才可以运行起来 ...