搭建PHP的缓存服务Memcache
1 .安装libevent(Memcache用到了libevent这个库用于Socket的处理)可以用# ls -al /usr/lib | grep libevent 来查看是不是已经安装完成了。
wget http://www.monkey.org/~provos/libevent-1.4.12-stable.tar.gz
./configure --prefix=/usr
2.安装Memcache
wget http://www.danga.com/memcached/dist/memcached-1.4.0.tar.gzhttp://www.danga.com/memcached/dist/memcached-1.4.0.tar.gz
./configure --with-libevent=/usr
3.启动memcache
# /usr/local/bin/memcached -d -m 100-u root -l 192.168.0.200 -p 12000 -c 256 -P /tmp/memcached.pid
4.停止memcache
# kill `cat /tmp/memcached.pid`
相关资料:
http://www.danga.com/memcached/
http://blog.iyunv.com/heiyeshuwu/archive/2006/11/13/1380838.aspx
页:
[1]