Memcache的安装
下载安装包:
wget http://www.memcached.org/files/memcached-1.4.32.tar.gz
wget https://cloud.github.com/downloads/libevent/libevent/libevent-1.4.14b-stable.tar.gz
安装libevent
tar xf libevent-1.4.14b-stable.tar.gz
cd libevent-1.4.14b-stable
./configure –prefix=/usr
./configure prefix=/usr
make
make install
ls -al /usr/lib | grep libevent
安装Memcache
cd ../memcached-1.4.
./configure –with-libevent=/usr
./configure-with-libevent=/usr
./configure -with-libevent=/usr
make
make install
ls -al /usr/local/bin/mem*
启动和关闭
memcached -p 11211 -u root -m 16m -c 10240 -d -P /tmp/memcached.pid
-d选项是启动一个守护进程,
-m是分配给Memcache使用的内存数量,单位是MB
-u是运行Memcache的用户,我这里是root,
-l是监听的服务器IP地址
-p是设置Memcache监听的端口,最好是1024以上的端口,
-c选项是最大运行的并发连接数,默认是1024
-P是设置保存Memcache的pid文件,我这里是保存在 /tmp/memcached.pid
关闭通过pkill或者杀pid的方式,如果实例多最好通过杀pid的方式。
操作语法
<commamd name> <key> <flags> <exptime> <bytes>\r\n
存取:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAA5QAAACDCAIAAAB9b8OhAAAU2UlEQVR4nO3d27mrKhSGYXuyHYuxF2qhlNSx1oVROYwBQ1BjZr732RdrzxAgHvAPIXEYFJN7LdykFWk1OaHWcfYXNAUAAIC/7cLUuhln/3r5eYzaJLoCAADgmMm9Xn6+q6UNwRUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOiC2xxkNzkIb4HAHRDwNs7+huNh9sH9N8I7yX2/9bzinMJtqoP5V4z2Bzv5Lv6nRg/gB4yzL5/hy63AxuzfR+vBL+kKr7Zj6ZZ43OGEM2Jyj36FCE3u1XnTxJ4a0gmG0oRDVfXQbTq2w7ea76tImDNPv9/kkU7OPrmufXZvHm6I6I3fUzvDk4cnp5wnhNfHmP2yjyb37HSnMh1L6pH4FITXH/NOKx3HZF8N+RnRevxcE171c/aa47wrvH58bx5r59l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AAADhF9I0rPbyG2dYYXpl6BQAAwMmMM69LgfUXBph5BQAAwCcIa14nt3/dKv32lp9H45pXwisAAADOdiS8vmdn+bUBAAAAfMah8LqU98XwOs6e33kFAADA2fQ7bC3hdQy/zLVF2PgeBNIdtlgvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOCP+Vf7DwAAAHgKwisAAAj8B3Fxh57zty6cAAAAAElFTkSuQmCC" alt="" />
除开用nc还可以用telent。
参考:http://www.cnblogs.com/zox2011/archive/2012/04/12/2444295.html
Memcache的安装的更多相关文章
- Linux下memcache的安装
memcache是高性能,分布式的内存对象缓存系统,用于在动态应用中减少数据库负载,提升访问速度.目前用memcache解决互联网上的大用户读取是非常流行的一种用法,在互联网企业中有着广泛的应用.关 ...
- Windows下Memcache的安装与在php中使用
memcache dll插件和测试例子下载地址: http://pecl.php.net/package/memcache Windows下Memcache的安装方法 Memcached官方:http ...
- php无法加载Memcache缓存模块问题及Memcache的安装
今天早上去迁移网站发现打开网站报错 然后我去phpinfo.php看了一下,果然我的测试页里面有加载到Memcache这个模块,如下图: 这时候,既然发现了问题的所在我们就要去排查问题,当前这个问题呢 ...
- Memcache的安装和使用【转】
转自:https://www.cnblogs.com/caoxiaojian/p/5715573.html Memcache是高性能,分布式的内存对象缓存系统,用于在动态应用中减少数据库负载,提升访问 ...
- windows php下memcache+memcached安装与配置
环境声明: 服务器:Windows7 64-bit:Memcached:Memcached 64-bit for Windows(64位) 安装过程 解压刚刚下载的压缩包,得到两个文件:memcach ...
- 第二篇 Nosql讲解之windows下memcache的安装(一)
memcached基本概念 1.Memcached是danga的一个项目,最早是LiveJournal服务的,最初为了加速LiveJournal访问速度而开发的,后来被很多大型的网站采用. 官方网站: ...
- windows下memcache扩展安装和搭建
### windows下memcache扩展安装和搭建 背景:在做微信公众号的开发时,token的有效期为7200秒,所以需要对token进行保存,在这选择了memcache作为缓存工具 memcac ...
- PHP Memcache 扩展安装
PHP Memcache 扩展安装 PHP Memcache 扩展包下载地址:http://pecl.php.net/package/memcache,你可以下载最新稳定包(stable). 下载对应 ...
- php扩展memcached和memcache的安装配置方法:转载
本文转载:http://www.jb51.net/article/56999.htm php连接memcached缓存服务器的客户端有两个,一个是memcache是比较底层的开发库,memcached ...
- Linux下memcache的安装和启动
memcache是高性能,分布式的内存对象缓存系统,用于在动态应用中减少数据库负载,提升访问速度.据说官方所说,其用户包括twitter.digg.flickr等,都是些互联网大腕呀.目前用memca ...
随机推荐
- yjfk 意见反馈
<div> <h1>我的第一个 JavaScript 程序</h1><p id="demo">这是一个段落</p>< ...
- java中MD5加密的小使用
最近项目中需要用到md5加密,就自己在网上看了看. package com.wxgs.ch01; import java.security.MessageDigest; import java.sec ...
- 关于viewport的研究
昨天项目中用到了适应移动端显示的viewport,一般的使用方式如下: <meta name="viewport" content="width=device-wi ...
- 山东理工大学第七届ACM校赛-最大收益问题 分类: 比赛 2015-06-26 10:25 51人阅读 评论(0) 收藏
最大收益问题 Time Limit: 2000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 铁牌狗最近迷上了一款游戏,但铁牌狗实在是太笨了,他还是要请求你的帮助. 有 ...
- linux主次设备号介绍
1.主设备号与次设备号的功能 在Linux内核中,主设备号标识设备对应的驱动程序,告诉Linux内核使用哪一个驱动程序为该设备(也就是/dev下的设备文件)服务:而次设备号则用来标识具体且唯一的某个设 ...
- 2016年6月27日 星期一 --出埃及记 Exodus 14:24
2016年6月27日 星期一 --出埃及记 Exodus 14:24 During the last watch of the night the LORD looked down from the ...
- linux 开启wifi热点
1,在网络连接管理中创建一个wifi连接,点击 Add,然后选Wi-Fi 2,设置wifi热点名字.wifi接连名字 3,设置 Mode 选 Ad-hoc,其它默认. 4,在 Wi-Fi Securi ...
- Python 2.7.9 Demo - JSON的编码、解码
#coding=utf-8 #!/usr/bin/python import json; dict = {}; dict['name'] = 'nick'; dict['say'] = 'hello ...
- Exchange 2010 邮箱大小限制原则
在 Exchange中文站 的QQ群(68280328)里经常会有朋友问到关于 Exchange 2010 邮件大小限制的问题,因为有许多地方,而且定义的内容又是同样的,所以,让本来很简单的限制原则变 ...
- Cheatsheet: 2013 11.12 ~ 11.30
Mobile Xcode 5 Essentials Android vs. iOS Development: Fight! Using MVC to Understand ASP.NET, iOS, ...