Monday, December 14, 2009

Install Memcached from source on Debian Lenny

Debian is quite simply excellent, and I wouldn't even consider running any other distro 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 is actually 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 with Debian Lenny, and Debian Etch.

Download the installation script

I would love to hear if this works for you :)

9 comments:

alexanderzwei said...

Thank you! It' works!

Scott Barr said...

Excellent. Great to hear it works for you :)

Josh said...

I just wanted to say thank you. This worked like a charm.

Scott Barr said...

Thanks Josh, I'm really happy to hear it worked well for you.

I've worked with my team at Global IT Creations
to advance the automated install and configuration of servers to new
levels. Now we can install and configure any necessary server software for multiple server roles on multiple servers.

Automated, repeatable server configuration... Nice!

Imagine powering up a server and having all services installed and configured within 10 minutes. That's where we are at now.

We recently built an entire new server cluster in 45 minutes.

I'm hoping to officially announce something on the
GITC site in the very near future.

Anonymous said...

installed on debian lenny.
well done! and saves a lot f fime

Dee said...

Hi, Linux newbie here.
How do you install this script on Debian Lenny? Thank you.

Scott Barr said...

Hi Dee

You just save the script on your server and run it from the command line.

Dee said...

Thank you for the reply Scott. What I needed was the command to use. I found an instruction online so I used this:
./install_memcached.sh install

And it seems to be installing it.

Scott Barr said...

@Dee correct. You save the script and just execute it. If you save the script as install_memcached.sh...

chmod u+x ./install_memcached.sh
./install_memcached.sh

Thats all there is to it :)