正文开始 <p>http://www.linuxidc.com/Linux/2016-07/133423.htm</p><p><br /></p><p></p><p>Memcache概述:<br />Memcache是一个高性能的分布式的内存对象缓存系统,通过在内存里维护一个统一的巨大的hash表,它能够用来存储各种格式的数据,包括图像、视频、文件以及数据库检索的结果等。简单的说就是将数据调用到内存中,然后从内存中读取,从而大大提高读取速度。</p><p>Memcached是以守护程序方式运行于一个或多个服务器中,随时会接收客户端的连接和操作。<br /> <br />Memcache安装:<br />1:下载libevent与memcache软件包。<br /> libevent下载地址:http://monkey.org/~provos/libevent/<br /> memcache下载地址:http://memcached.org/<br /> <br />2:解压,编译libevent。<br /># tar -zxvf libevent-2.1.3-alpha.tar.gz <br /># cd libevent-2.1.3-alpha <br /># ./configure -prefix=/usr/local/memcache/libevent <br /># make && make install</p><p>3:解压,编译memcache。<br /># cd ../ <br /># tar -zxvf memcached-1.4.15.tar.gz <br /># cd memcached-1.4.15 <br /># ./configure --prefix=/usr/local/memcache/ --with-libevent=/usr/local/memcache/libevent <br /># make && make install</p><p>开启memcache,并连接测试:<br /></p><p>以守护进程模式启动memcache</p><p>ifconfig 查看IP ,如:172.18.103.31<br /></p><p># /usr/local/memcache/bin/memcached -d -l 172.18.103.31 -p 11211 -m 2048 -u root</p><p>查看memcache是否开启:</p><p>netstat -na|grep 11211</p><p>cat /etc/sysconfig/memcached</p><p><br /></p><p><img src="http://img.li6.cc/content_img/1/article/72/160721173624981.png" alt="" style="cursor: pointer; display: block;" width="706" vspace="5" /></p><p>客户端连接测试(使用telnet)<br />#telnet 192.168.189.129 11211</p><p>能连接上,说明memcache成功启用,可使用stats命令查看当前状态<br />#stats<br />STAT pid 29563<br />STAT uptime 228<br />STAT time 1377137834<br />STAT version 1.4.15<br />STAT libevent 2.1.3-alpha<br />STAT pointer_size 64<br />STAT rusage_user 0.000999<br />STAT rusage_system 0.000999<br />STAT curr_connections 5<br />STAT total_connections 6<br />STAT connection_structures 6<br />STAT reserved_fds 20<br />STAT cmd_get 0<br />STAT cmd_set 0<br />STAT cmd_flush 0<br />STAT cmd_touch 0<br />STAT get_hits 0<br />STAT get_misses 0<br />STAT delete_misses 0<br />STAT delete_hits 0<br />STAT incr_misses 0<br />STAT incr_hits 0<br />STAT decr_misses 0<br />STAT decr_hits 0<br />STAT cas_misses 0<br />STAT cas_hits 0<br />STAT cas_badval 0<br />STAT touch_hits 0<br />STAT touch_misses 0<br />STAT auth_cmds 0<br />STAT auth_errors 0<br />STAT bytes_read 7<br />STAT bytes_written 0<br />STAT limit_maxbytes 2147483648<br />STAT accepting_conns 1<br />STAT listen_disabled_num 0<br />STAT threads 4<br />STAT conn_yields 0<br />STAT hash_power_level 16<br />STAT hash_bytes 524288<br />STAT hash_is_expanding 0<br />STAT bytes 0<br />STAT curr_items 0<br />STAT total_items 0<br />STAT expired_unfetched 0<br />STAT evicted_unfetched 0<br />STAT evictions 0<br />STAT reclaimed 0<br />END</p><p><a href="http://www.linuxidc.com/topicnews.aspx?tid=14" target="_blank" title="CentOS">CentOS</a> 6.6下Memcached 源码安装配置 <a href="http://www.linuxidc.com/Linux/2015-09/123019.htm">http://www.linuxidc.com/Linux/2015-09/123019.htm</a></p><p>Memcached 安装及启动脚本 <a href="http://www.linuxidc.com/Linux/2013-07/87641.htm">http://www.linuxidc.com/Linux/2013-07/87641.htm</a></p><p>PHP中使用Memcached的性能问题 <a href="http://www.linuxidc.com/Linux/2013-06/85883.htm">http://www.linuxidc.com/Linux/2013-06/85883.htm</a></p><p><a href="http://www.linuxidc.com/topicnews.aspx?tid=2" target="_blank" title="Ubuntu">Ubuntu</a>下安装Memcached及命令解释 <a href="http://www.linuxidc.com/Linux/2013-06/85832.htm">http://www.linuxidc.com/Linux/2013-06/85832.htm</a></p><p>Memcached的安装和应用 <a href="http://www.linuxidc.com/Linux/2013-08/89165.htm">http://www.linuxidc.com/Linux/2013-08/89165.htm</a></p><p>使用Nginx+Memcached的小图片存储方案 <a href="http://www.linuxidc.com/Linux/2013-11/92390.htm">http://www.linuxidc.com/Linux/2013-11/92390.htm</a></p><p>Memcached使用入门 <a href="http://www.linuxidc.com/Linux/2011-12/49516p2.htm">http://www.linuxidc.com/Linux/2011-12/49516p2.htm</a></p><p>Memcached 的详细介绍:<a title="Memcached" href="http://www.linuxidc.com/Linux/2012-03/56534.htm" target="_blank">请点这里</a><br />Memcached 的下载地址:<a title="Memcached" href="http://www.linuxidc.com/down.aspx?id=280" target="_blank">请点这里</a></p><p>本文永久更新链接地址:<a href="http://www.linuxidc.com/Linux/2016-07/133423.htm">http://www.linuxidc.com/Linux/2016-07/133423.htm</a></p><br />
正文结束 |
阿里云、腾讯云 apache的vhost配置https | linux下phpMyAdmin 出现 “缺少 mysqli 扩展,请检查 PHP 配置。” |