Linux memcached
来源:互联网 发布:中国10月经济数据公布 编辑:程序博客网 时间:2024/06/07 05:00
1.memcached-tool 查看chunk 信息
2.数据过期
Lazy Expiration:
LRU: 最近最少使用
3.安装
#yum install -y epel-release
#yum install -y libevent memcached libmemcached
#/etc/init.d/memcached start
编译安装:
yum -y install libevent* gcc make
./configure --prefix=/data/opt/memcached
make && make install
编译安装:
yum -y install libevent* gcc make
./configure --prefix=/data/opt/memcached
make && make install
#memcached -d -p 11211 -u memcached -m 64 -c 1024 -P /var/run/memcached/memcached.pid
-d 启动一个守护进程
-m 使用多少 MB
-u 指定用户
-l 监听 ip
-p 端口
-c 最大并发连接数
-P 指定pid 文件
#cat /etc/sysconfig/memcached
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS=""
修改之后可以改变 memcached 启动参数
4.查看 memcached 运行状态
1).memcached-tool 127.0.0.1:11211 stats
get_hits(命中), cmd_get, cmd_set
2).echo stats|nc 127.0.0.1:11211 ( yum -y install nc )
3).memstat --servers=127.0.0.1:11211
5.memcached 命令行
1).telnet 127.0.0.1 11211
2).set key1(键名) 0(tag) 60(过期时间 s ) 2(大小 字节)
输入 12 -》 回车(存储 12)-》get key1
quit 退出
add newuser 0 0 7
replace newuser 0 0 7
delete newuser
flush_all 清空缓存
0 0
- Linux memcached
- linux install memcached,Linux安装memcached
- Linux下安装Memcached
- Linux 安装 memcached 备忘
- LINUX上安装memcached
- Linux下安装memcached
- memcached for linux安装
- linux下安装memcached
- linux下memcached安装
- Linux 安装 Memcached
- Memcached安装指南(linux)
- linux下安装memcached
- linux下安装memcached
- Linux下Memcached安装
- linux下安装memcached
- Linux memcached 安装
- linux安装memcached
- linux下 memcached安装
- poj2516Minimum Cost最小费用最大流
- exec
- 我下载的jeecsm插件的一些资源
- CodeForces 630 H. Benches(组合数学)
- [FMS]FMS5.0流媒体服务器配置文件Application.xml介绍
- Linux memcached
- Android多线程线程池(创建四种线程池)
- 【VB.NET】获取文件版本信息
- 提升算法 AdaBoost元算法 提升树算法 in Python
- [leetcode] 318. Maximum Product of Word Lengths
- vbird笔记2016-02-21
- PB9.0 安装不上—到“setup is running"就不动了
- IP地址分为A,B,C,D,E五类
- java安全——类加载器+字节码校验+安全管理器与访问权限