安装memecached
第一步:安装libevent
# tar zvxf libevent-2.1.8-stable.tar.gz
# cd libevent-2.1.8-stable
# ./configure --prefix=/usr/local/libevent
# make
# make install
# cd /usr/lib64
# ln -s /usr/local/libevent/lib/libevent-2.1.so.6
第二步:安装memecached
# tar zxvf memcached-1.4.35.tar.gz
# cd memcached-1.4.35
# ./configure --prefix=/usr/local/memcached
# make
# make install
第三步:启动
# cd /usr/local/memcached/bin
# ./memcached -d -u root -m 128 -c 1000 -P '/tmp/memcached.pid'
第四步:测试
1.查看进程
# ps -ef|grep memcached |grep -v grep
2.查看端口
# lsof -i:11211
3.telnet测试
# telnet 192.168.6.128 11211
输入:stats
返回:
至此memecached安装成功。