Install Memcached from source on Debian

Posted February 20, 2010 by Scott Barr
Categories: debian, gist, howto, memcached

Debian is quite simply excellent, and I wouldn’t even consider running any other Linux distribution in production anymore.

Occasionally though, there are packages that become a bit outdated, and a source install is needed.

For me, Memcached is one of those packages. The latest in the Debian Lenny Apt repositories is 1.2.2, but the latest stable build of Memcached is 1.4.4. Good luck seeing that in the stable apt repositories anytime soon 🙂

So, to make life easy, I’ve put together a fairly simple bash script that downloads and installs Memcached, and libevent, for you.

The script is a blunt instrument, and assumes…

  1. You haven’t installed memcached from apt repositories on this machine
  2. You won’t be sad when it puts config and startup files at
    • /etc/memcached.conf
    • /etc/init.d/memcached
    • /usr/share/memcached/scripts/start-memcached

If you have installed memcached using apt, I suggest uninstalling it first, and backup the 3 config files.

This script has worked for me on Debian Lenny, and Debian Etch.

Download the installation script

I would love to hear if this works for you 🙂

Originally posted at Wandering Coder