Can’t get memcached / php memcache installed on CentOS 5.5

centos5memcachememcached

I cannot get memcached installed for the life of me on CentOS 5.5

yum install memcached says package doesn't exist

I have tried installing from source, as well as yum. Apparently memcached is running according to ps auxw, and I have the extension loaded in my php.ini file, but PHP is saying it's not installed… It's not showing up under phpinfo

Best Answer

Memcached and the Memcached PHP extension are not part of the standard CentOS repository.

You need to install something like the RPMForge repository to get the appropriate packages.

Instructions for installing RPMForge are here.

After that, the packages you're looking for are memcached and php-pecl-memcached, i.e.:

yum install memcached php-pecl-memcached

You may need to restart your webserver after installing this for the PHP extension to become active.

I'm assuming that you see the memcached process running because you installed from source and started it. You might want to "make uninstall" from your source tree before you install proper packages.