Installing memcached and libmemcache on Debian

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.

To use it with C++ apps you also need libmemcached which is client library to the memcached server. It has been designed to be light on memory usage, thread safe, and provide full access to server side methods.

As far as I know there is no Debian package for libmmemcached but there is one for memcached.

Installing memcache

The easiest way is to install it via APT:

user@computer:$ apt-get install memcached

Installing libmemcached

You will have to compile it yourself using source code

user@computer:$ cd /usr/local/src/
wget http://download.tangent.org/libmemcached-0.39.tar.gz
tar -zxf libmemcached-0.39.tar.gz
cd libmemcached-0.39
./configure –prefix=/usr
make
make install

I’ve put all those commands in a small SH script:

#!/bin/sh
echo "Installing memcached"
apt-get install -y memcached
echo "Installing libmemcached-0.39"
cd /usr/local/src/
wget http://download.tangent.org/libmemcached-0.39.tar.gz
tar -zxf libmemcached-0.39.tar.gz
cd libmemcached-0.39
./configure –prefix=/usr
make
make install
echo "Installation finished"

Some sentences were stolen borrowed from memcached and libmemecached websites, I’m too lazy to write something that was already written

Share on TwitterShare on TumblrSubmit to StumbleUponSave on DeliciousDigg ThisSubmit to reddit
  • http://www.olivernassar.com/ Oliver Nassar

    wow. i love you. you saved my life. i owe you a beer if you’re ever in SF.

  • http://www.krzywanski.net/ Artur

    @Oliver Nassar Not going to SF but you can get me a beer, just use Donate button on the right ;)

  • Stephen

    to avoid the symlink try this:
    ./configure –prefix=/usr

  • http://www.krzywanski.net/ Artur

    Thanks for a tip, I’ll check it out next time I’ll have to install memcached :)

  • http://pulse.yahoo.com/_VXFII4T2SFLU523XBCSH2EHUSQ Find PDF

    By default, `make install’ will install all the files in
    `/usr/local/bin’, `/usr/local/lib’ etc. You can specify
    an installation prefix other than `/usr/local’ using `–prefix’,
    for instance `–prefix=$HOME’.

  • Marco

    Thanks!