安装
1.下载源码包 wget http://memcached.org/files/memcached-1.5.10.tar.gz
2.解压源码包 tar xfv memcached-1.5.10.tar.gz
3.进入解压包 cd memcached-1.5.10
4.配置 ./configure --prefix=/usr/local/memcached
如出现错误提示,要求安装libevent依赖包,就执行 yum install libevent libevent-devel
5.安装 make && make install
启动
前台启动:/usr/local/memcached/bin/memcached -p 11211 -m 64m -u nobody -vv
后台启动:/usr/local/memcached/bin/memcached -p 11211 -m 64m -d -u nobody
-u以nobody用户身份启动,-p是启动端口,-m是设置最大分配内存
连接
telnet localhost 11211
没有安装telnet则 yum install telnet