Memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

1. Setting-up RPMForge respository. RPMForge repository (http://dag.wieers.com) is the biggest rpm respository for RHEL, CentOS for all versions. Setup the RPMForge repository as mentionedhere.

2. Install memcached.

Use yum to install memcached

As soon as memcached installation completed, edit options for memcached in /etc/sysconfig/memcached to meet your need.

Save the file. All options can be seen by using following command

Start memcached

To check the running status of memcached

and

3. Install PHP Extension.

Download and install latest stable memcache version from PECL.

memcache.so will be installed in php modules directory, now enable memcache.so extension in php.ini

To find out your php.ini location, execute following command

Save the file and restart httpd server.

To check is memcache extension loaded in php, execute following command.

This information can also be seen using phpinfo().