安装memcached

1.首先要先安装libevent库

sudo apt-get install libevent ibevent-dev 

或者

yum install libevent libevent-devel

2.安装memcached
源码安装(下载好了需要重新命名)

wget http://memcached.org/latest
tar -zxvf memcached-1.x.x.tar.gz
cd memcached-1.x.x                          
./configure --prefix=/usr/local/memcached
make && make test
sudo make install

3.命令帮助

/usr/local/memcached/bin/memcached -h

4.作为前台程序运行

/usr/local/memcached/bin/memcached -p 11211 -m 64m -vv

5.作为后台服务程序运行

/usr/local/memcached/bin/memcached -p 11211 -m 64m -d

你可能感兴趣的:(安装memcached)