Memcached – Installation and configuration


Memcache is a 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 APIis available for most popular languages.

Memcached Installation

  1. Install memcached service: 
    yum install memcached
  2. Install memcached extension for PHP:
    yum install gcc-c++
    yum install zlib-devel
    tar xzvf libmemcached-1.0.16.tar.gz
    cd libmemcached-1.0.16
    ./configure --without-memcached && make && make install
    pecl install memcached
    vi /etc/php.d/memcached.ini
    #### add to the file ####
  3. Configure memcached parameters:
    1. Edit /etc/init.d/memcached
    2. Edit /etc/sysconfig/memcached

Leave a Reply