安装memcache之前需要有libevent的支持
yum install libevent libevent-
deve(次要自己安装一下)
紧接着安装memcache服务,可以使用yum源直接进行安装,也可以使用tar包进行安装,这里介绍tar包安装方式
1.
wget http
:
//memcached.org/latest #获取tar包 (使用网址浏览后将下载的tar包放到安装的位置)
2.
tar -zxvf
tar memcached-1.x.x.tar.
gz #进行解压tar包
3.
cd memcached
-1.x.
x #进入tar包
4.
./configure --prefix=/usr/local/
memcached #配置并重定义位置
5.