, , , ,

I’m using lampp 1.8.3-1 in kubuntu 13.04. By default, lampp does not include memcached libraries so we need to install it manually.

Libmemcached is a prerequisite to memcached. We need to install it first.

  1. Download libmemcached-1.0.16 from http://libmemcached.org. As of this writing 1.0.17 is the latest version and it does not work or broken.
  2. tar xzf libmemcached-1.0.16.tar.gz
  3. cd libmemcached-0.41
  4. ./configure –prefix=/usr/local
  5. make
  6. sudo make install

Finally build and install memcached

  1. pecl download memcached
  2. tar xzf memcached-x.x.x (where x.x.x is the latest version)
  3. cd memcached-x.x.x
  4. ./configure –with-php-config=path_to_lampp/bin/php-config –with-libmemcached-dir=/usr/local
  5. make
  6. sudo make install
  7. copy memcached.so (I think it’s located in modules folder) to {path_to_lampp}/modules
  8. Modify the php.ini file (path_to_lampp/etc/php.ini) and add: extension=memcached.so