1、安装 EPEL Repo
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
2、安装 Memcache
yum -y install memcached
安装过程中可能会出现如下问题:
--> Missing Dependency: perl(Net::SSLeay) >= 1.33 is needed by package perl-AnyEvent-5.240-1.el5.rf.noarch (rpmforge)
Error: Missing Dependency: perl(Net::SSLeay) >= 1.33 is needed by package perl-AnyEvent-5.240-1.el5.rf.noarch (rpmforge)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.
这个问题是因为CentOS的 yum没有memcached需要的最新的 perl-Net-SSLeay 和 perl-IO-Socket-SSL包.
解决办法也很简单,删除旧的包,安装新的包。
查看旧版本的包
rpm -qa | grep perl-Net-SSLeay
rpm -qa | grep perl-IO-Socket-SSL
移除并安装新包
rpm-e perl-Net-SSLeay-1.30-4.fc6
rpm -e perl-IO-Socket-SSL-1.01-1.fc6
wget http://packages.sw.be/perl-Net-SSLeay/perl-Net-SSLeay-1.36-1.el5.rfx.i386.rpm
wget http://packages.sw.be/perl-Net-SSLeay/perl-Net-SSLeay-1.36-1.el5.rfx.x86_64.rpm
wget http://packages.sw.be/perl-IO-Socket-SSL/perl-IO-Socket-SSL-1.34-1.el5.rfx.noarch.rpm
rpm -i perl-Net-SSLeay-1.36-1.el5.rfx.x86_64.rpm
rpm -i perl-Net-SSLeay-1.36-1.el5.rfx.i386.rpm
rpm -i perl-IO-Socket-SSL-1.34-1.el5.rfx.noarch.rpm
然后再执行安装命令
yum -y install memcached
即可安装成功
3、设置为开机启动
chkconfig --level 2345 memcached on
4、启动和停止
/etc/init.d/memcached start|stop
from:http://www.cnblogs.com/jiunadianshi/articles/2001305.html