memcached安装和验证
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了memcached安装和验证,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2430字,纯文字阅读大概需要4分钟。
内容图文
1》 libevent安装 官网down: http://www.monkey.org 我的网盘down:http://pan.baidu.com/s/1qW8syZi [root@luozhonghua memcachedsource]# tar -zxvf libevent-1.4.13-stable.tar.gz [root@luozhonghua memcachedsource]# cd libevent-1.4.13-stable [root@
1》 libevent安装
官网down: http://www.monkey.org
我的网盘down:http://pan.baidu.com/s/1qW8syZi
[root@luozhonghua memcachedsource]# tar -zxvf libevent-1.4.13-stable.tar.gz
[root@luozhonghua memcachedsource]# cd libevent-1.4.13-stable
[root@luozhonghua memcachedsource]# ./configure --prefix=/usr
[root@luozhonghua memcachedsource]# make && make install
#./configure --prefix=/usr && make && make install
这里一定要注意指定--prefix,后面配置memcached的时候就有必要用到。
2》 memcached安装
官网down: http://www.monkey.org
我的网盘down:http://pan.baidu.com/s/1qW8syZi
[root@luozhonghua memcachedsource]# tar -zxvf memcached-1.4.5.tar.gz
[root@luozhonghua memcachedsource]# cd memcached-1.4.5
[root@luozhonghua memcached-1.4.5]# ./configure --with-libevent=/usr/lib
[root@luozhonghua memcached-1.4.5]# make && make install
# ./configure --with-libevent=/usr/lib && make && make install
这里一定要指定libevent的路径,否则启动的时候就有找不到libevent的so文件的错误!
3> memcached 启动
# /usr/local/bin/memcached -m 32m -p 11211 -d -u root -P /var/run/memcached.pid -c 256 -vv
/usr/local/bin/memcached -d -m 512 -p 11211 -u root -c 256 -P /var/run/memcached.pid
4> memcached 关闭
kill -9 `cat /var/run/memcached.pid`
注意,如果`cat /var/run/memcached.pid`值是缓存上一次的就无效,可直接查到pid值=7787
5>测试
5.1> telnet 127.0.0.1 11211
5.2> stats
stats
STAT pid 7787
STAT uptime 470
STAT time 1405273052
STAT version 1.4.5
STAT pointer_size 32
STAT rusage_user 0.002999
STAT rusage_system 0.101984
STAT curr_connections 10
STAT total_connections 12
STAT connection_structures 11
STAT cmd_get 0
STAT cmd_set 0
STAT cmd_flush 0
STAT get_hits 0
STAT get_misses 0
STAT delete_misses 0
STAT delete_hits 0
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 27
STAT bytes_written 49
STAT limit_maxbytes 536870912
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 4
STAT conn_yields 0
STAT bytes 0
STAT curr_items 0
STAT total_items 0
STAT evictions 0
STAT reclaimed 0
END
6》 退出
quit
内容总结
以上是互联网集市为您收集整理的memcached安装和验证全部内容,希望文章能够帮你解决memcached安装和验证所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。