php use memcached in ubuntu 14.04
I assume you already had a lamp environment
first step,we must to install memched in our Ubuntu System,
open the url( https://memcached.org/downloads ) go to the Installation section ,you will see like this :
Debian/Ubuntu: apt-get install libevent-dev Redhat/Centos: yum install libevent-devel
wget http://www.memcached.org/files/memcached-1.4.25.tar.gz
tar -zxvf memcached-1.4.25.tar.gz
cd memcached-1.4.25
./configure && make && sudo make install
just follow it to do
to here ,if no some error occured ,you system already installed memcached service ;
run memcached as daemaon service:
memcached -d -u root
And then ,
In most cases,your php don't open the memcached extension,so we need to solve it ,
you can compile php with enable-memcache,i think its a bad way ,so,I will use phpize to do it ,if you want to learn more about phpize ,to my another blog ( http://www.cnblogs.com/codeAB/p/5560371.html )
go to the Url( http://pecl.php.net ) and search "memcache" you will look two simlilar package:
memcache memcached extension
memcached PHP extension for interfacing with memcached via libmemcached library
If you look the php document, you alse see two extension memcache and memcached ,the two extension is more simlilar to use , But memcached is update soon means it will provide more new feature , I suggest to the memcached ,
download memcached from ( http://pecl.php.net/get/memcached-2.1.0.tgz ; tips:don't download latest version 2.2,it not success in my ubuntu 14, you should try it )
1. tar -xzvf memcached-2.1.0.tgz
2. cd memcached-2.1.0/
3. phpize
( if occured: No command 'phpize' found, did you mean:
Command 'phpize5' from package 'php5-dev' (main)
Fixed: sudo apt-get install php5-dev
)
4. ./configure --enable-memcached
( if occured: configure: error: memcached support requires libmemcached
Fixed:
wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz ( tips:don't get lastest version of 1.0.18,it unusefull for me )
./configure && make && sudo make install
)
5. make
6. sudo make install
7. sudo vim /etc/php5/apache2/php.ini
add one line in the end: extension=memcached.so
Now,sudo service apache2 restart
use phpinfo() to see whether the memcached extension is appear.
php use memcached in ubuntu 14.04的更多相关文章
- Ubuntu 14.04中Elasticsearch集群配置
Ubuntu 14.04中Elasticsearch集群配置 前言:本文可用于elasticsearch集群搭建参考.细分为elasticsearch.yml配置和系统配置 达到的目的:各台机器配置成 ...
- deepsooncms在Ubuntu 14.04上部署教程
deepsooncms在Ubuntu 14.04上部署教程 一.安装mono1.在命令行运行sudo apt-key adv --keyserver keyserver.ubuntu.com --re ...
- Ubuntu 14.04 中 安装elasticsearch2.*+logstash2.*+kibana
在Ubuntu 14.04 上安装单机版ELK 2.*(脚本化) 1.判断是否为root权限 if [ "${UID}" -ne 0 ]; then echo "You ...
- 【DDD/CQRS/微服务架构案例】在Ubuntu 14.04.4 LTS中运行WeText项目的服务端
在<WeText项目:一个基于.NET实现的DDD.CQRS与微服务架构的演示案例>文章中,我介绍了自己用Visual Studio 2015(C# 6.0 with .NET Frame ...
- Ubuntu 14.04 LTS下安装Google Chrome浏览器
在Ubuntu 14.04下安装Google Chrome浏览器非常简单,只要到Chrome的网站下载Deb安装包并进行安装即可.当然你也可以使用APT软件包管理器来安装Google Chrome浏览 ...
- 烂泥:ubuntu 14.04搭建OpenVPN服务器
本文由秀依林枫提供友情赞助,首发于烂泥行天下 公司分部需要连接公司内部的服务器,但是该服务器只允许公司内部的网络访问. 为了解决这个问题,打算使用VPN.对于VPN以前使用最多的是PPTP这个解决方案 ...
- ubuntu 14.04 desktop装vnc4server
ubuntu 14.04 desktop上安装vnc4server要装上gnome的一些软件包并修改启动文件~/.vnc/xstartup 问题来源How to make VNC Server wor ...
- 在Ubuntu 14.04安装和使用Docker
Docker是一个开源软件,它可以把一个Linux应用和它所依赖的一切(比如配置文件)都封装到一个容器.然而,Docker与虚拟机不同,它使用了沙箱机制,Docker容器不运行操作系统,它共享主机上的 ...
- Window7下安装Ubuntu 14.04 64bit
本文章主要讲解如何在Windows7操作系统中硬盘安装Ubuntu 14.04 64bit: 1.准备文件 1.ubuntu-14.04.4-desktop-amd64.iso 2.EasyBCD.e ...
随机推荐
- Debian的软件包管理工具命令 (dpkg,apt-get)详解
本文转载于:http://blog.chinaunix.net/uid-20769502-id-106056.html 1.dpkg包管理工具 dpkg --info "软件包名&quo ...
- 继续上篇抢QQ口令红包,抢那招抢不了的红包技巧
- - - - - - - - - - -- - - --长按红包,出现回复,点击回复,那回复里有个表情,直接输入那个表情回复就可以抢了 - - - - - - - - --------------- ...
- python 学习笔记 -logging模块(日志)
模块级函数 logging.getLogger([name]):返回一个logger对象,如果没有指定名字将返回root loggerlogging.debug().logging.info().lo ...
- Java Business Process Management(业务流程管理) 初识环境搭建
一.简介 (一)什么是jbpm JBPM,全称是Java Business Process Management(业务流程管理),它是覆盖了业务流程管理.工作流.服务协作等领域的一个开源的.灵活的.易 ...
- H3 BPM初次安装常见错误详解5-7
错误5:登陆无反应,F12查看后台网络请求错误如下图所示 错误原因:ISAPI未对相应的.net版本允许. 解决方法:IIS的根节点--右侧"ISAPI和CGI限制"打开--将相 ...
- 在Outlook中查看预览SharePoint文档库的文档
本文概况 阅读时间: 约2分钟 适用版本:SharePoint Server 2010及以上 面向用户:普通用户,管理员 难度指数:★★☆☆☆ 在日常工作中,总有一些常用的文档需要经常打开查看,其实我 ...
- 通过Wireshark抓包进行Cookie劫持
首先在目标A机器上运行Wireshark并开启浏览器,开启前关闭其他占用网络的软件,这里我拿51CTO.com做测试. 正常登陆51CTO用户中心,此时使用 http.cookie and http. ...
- DevOps
DevOps DevOps(英文Development和Operations的组合)是一组过程.方法与系统的统称,用于促进开发(应用程序/软件工程).技术运营和质量保障(QA)部门之间的沟通.协作与整 ...
- 用drawRect的方式实现一个尺子
用drawRect的方式实现了一个尺子选择器,demo在这里:https://github.com/Phelthas/LXMRulerView 效果如图: 如果不考虑复用的问题,我感觉最简单的实现 ...
- Android编码规范05
编码逻辑规范总结: 1.避免使用多个类放在一个文件里,除非是一次性使用的内部类 2.一个方法代码长度最好不要超过35行 3.原则上尽量不要修改自动生成的文件,如R文件 4.Final String 取 ...