Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its API is available for most popular languages.

memcached : High Performance, Distributed Memory Object Cache server package.
perl-Cache-Memcached : Perl client (library) to work with memcached server.
python-memcached : Perl client (library) to work with memcached server.
php-pecl-memcache : PHP extension to work with the Memcached server.

Steps to install LibEvent

First we need to check if libevent is installed or not?
whereis libevent

Try to install it through yum
yum install libevent

If you don’t find it, then we need to download and install it.  Type following sequence of commands on your shell

tar xfz libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
make install

Steps to install Memcached

Try to with Yum

yum install memcached


Download and install from source.

tar xfz memcached-1.4.15.tar.gz
cd memcached-1.4.15
make install

Run Memcached as a daemon (d = daemon, m = memory, u = user, l = IP to listen to, p = port)

memcached -d -m 1024 -u root -l -p 11211

Install PHP Memcache

Try to install it through easyapache. Otherwise, use the following steps.

tar zxvf memcache-3.0.8.tgz
cd memcache-3.0.8
make install

vi /usr/local/lib/php.ini

Find the extension as below and if it is not existed, add it in the php.ini.

Restart the Apache services.

service httpd restart

Tomonitor the memcached status

watch “echo stats | nc 11211”

$ echo “stats” | nc 11211

watch ‘php -r ‘”‘”‘$m=new Memcache;$m->connect(“″, 11211);print_r($m->getstats());'”‘”


Get Free cPanel Knowledge Base

Thank you for subscribing.

Something went wrong.

5.00 avg. rating (96% score) - 1 vote