Memcached安装配置

需要用的软件 memcached-1.4.10.tar.gz      libevent-2.0.16-stable 这两个软件都是目前最新稳定版本
 
1, 先安装 libevent-2.0.16-stable 在安装 memcached-1.4.10.tar.gz
 tar zxvf libevent-2.0.16-stable.tar.gz 
 cd libevent-2.0.16-stable 
 ./configure --prefix=/usr/local/libevent 
 make && make install 
 tar zxvf memcached-1.4.10.tar.gz 
 cd memcached-1.4.10 
 ./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent/ 
 make && make install
2, 简单测试
#/usr/local/memcached/bin/memcached –u root –d –m 200 –l 127.0.0.1 –p 11211 –P /var/memcached.pid
#ps aux|grep memcache |grep –v ‘grep’
root      8979  0.0  0.2  64732  1072 ?        Ssl  12:03   0:00 /usr/local/memcached/bin/memcached -u root -d -m 200 -l 127.0.0.1 -p 11211 -P /var/memcached.pid 
#lsof –I :11211
COMMAND    PID USER   FD   TYPE DEVICE SIZE NODE NAME
memcached 8999 root   26u  IPv4  12244       TCP one.t.com:11211 (LISTEN)
memcached 8999 root   27u  IPv4  12245       UDP one.t.com:11211

你可能感兴趣的:(memcached)