1、由于memcached是基于libevent的,因此需要安装libevent,libevent-devel
- 方法一:# yum install libevent libevent-devel -y(一键安装的形式)
- 方法二:1> tar zxvf libevent-2.0.17-stable.tar.gz 2>./configure --prefix=/usr/local/memcache && make && make install
2、下载并解压memcached-1.4.5
memcached官方网站是:http://memcached.org/
- # cd /usr/local
- # mkdir memcache(将压缩包放在该文件夹下)
- # cd /usr/local/memcache
- # tar -xvzf memcached-1.4.5.tar.gz
3、编译安装memcached-1.4.5
- # cd memcached-1.4.5
- # ./configure --prefix=/usr/local/memcache
- # make
- # make install
4、是否正常?Telnet上去看看
- telnet 192.168.40.151 11211
然后输入 stats 查看Memcached服务是否正常然后quit退出 参考资料:http://snowolf.iteye.com/blog/1447348
centos 安装memcache
时间: 2024-10-08 07:39:48