Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to follow the instructions here to install Memcached on a CentOS machine, and I'm not having much luck.

The instructions say to first enable rpmforge repository as follows:

rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

This appears to go OK.

Then they say to install memcached by using yum:

yum -y install memcached

This gets the download speeds of various mirror sites, then says "Setting up Install Process", and then finally "No package memcached available".

What am I doing wrong here?

EDIT: These are the contents of my /etc/yum.conf file:

root@vps-1077739-6497 [/etc/sysconfig]# cat /etc/yum.conf
[main]
exclude=apache* bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum

# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

installonly_limit = 5

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
share|improve this question
    
What version of CentOS? –  Jeff Ferland Dec 20 '11 at 17:57
    
Maybe snagging from RPMForge would be an option? pkgs.repoforge.org/memcached just download the rpm and install. –  Tim Dec 20 '11 at 18:08
    
@jeff-ferland, My version of CentOS is 5.7. –  Tola Odejayi Dec 20 '11 at 18:16
    
@tim, thanks for your suggestion - I'll give that a go. –  Tola Odejayi Dec 20 '11 at 18:16
add comment

2 Answers

up vote 0 down vote accepted

Memcached is in the rpmforge-extras repository and it is not enabled by default.

Installing:
 memcached                              i386                         1.4.7-1.el5.rfx                         rpmforge-extras                        79 k

You need to edit the file /etc/yum.repos.d/rpmforge.repo and put "enabled = 1" instead of "enabled = 0" in the [rpmforge-extras] section and then re-run your command yum -y install memcached.

Your /etc/yum.repos.d/rpmforge.repo should looks like this:

### Name: RPMforge RPM Repository for RHEL 5 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-testing]
name = RHEL $releasever - RPMforge.net - testing
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/testing
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge-testing
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-testing
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
share|improve this answer
    
Just for information I reproduce the case before answering on a OpenVZ VPS with your exact command –  drivard Dec 20 '11 at 18:49
    
I am marking your response as the answer because it removed the issue I was having. Unfortunately, I ran into dependency issues with libevent and various Perl modules, and in the end I had to download/compile the source. These are the links I followed (in case anyone else ever has this problem): mrphp.com.au/code/install-memcache-cpanel-running-centos and alexle.net/archives/tag/libevent. The versions referred to in the links are out of date, so whoever is following the instructions should get the latest versions at the Memcached and Libevent sites. –  Tola Odejayi Dec 20 '11 at 20:14
add comment

It's hard to say what you're doing wrong. According to http://rpm.pbone.net/index.php3, RHEL5 and CentOS 6 (among others) provide memcached. CentOS5 has it in the testing branch. Perhaps if you're stuck, searching for "memcached" there for your distro will allow you a direct download that works.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.