前段时间,我们实验室的师姐过来给我们来讲了现在公司所有到的新技术---------memcached,感觉很强大本来下来就要按着师姐的例子给走一遍呢,结果杂事太多给耽搁了。上次新浪网院的老师上课是也讲到了这个memcached,说是现在新浪微博就是用到了大量的memcached这种缓存机制。所以下定决心一定要尝试下这个memcached的威力有多大。
先是上官网上下一个源码安装包来,可是这里memcached的正常运行需要又libevent来进行网络并发链接的处理,所以这两个软件大家都要安装才行。
root@linuxso.com:~# ps aux |grep memcached root 14715 0.0 0.0 44404 892 ? Ssl 20:56 0:00 /usr/local/memcached/bin/memcached -d -m 64 -u root -l 10.5.110.234 -p 11212 -c 256 -P/tmp/memcached.pid root 14814 0.0 0.0 5892 800 pts/0 S+ 21:32 0:00 grep --color=auto memcached root@linuxso.com:~# stat.html' target='_blank'>netstat -ntl 激活Internet连接 (仅服务器) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN tcp 0 0 10.5.110.234:11212 0.0.0.0:* LISTEN
root@linuxso.com:~# kill -9 14715 root@linuxso.com:~# ps aux |grep memcached root 14816 0.0 0.0 5892 800 pts/0 S+ 21:32 0:00 grep --color=auto memcached