The Montoya Herald, a weblog about Blueprint, jQuery, design, music and life, publishing on the web since September 2005. Written by Christian Montoya: developer, designer and entrepreneur.

The Montoya Herald — ChristianMontoya.com

Search

I Recommend

Genesis Rocket

Like What I Do?

My Amazon.com Wish List

On this domain

Elsewhere

HOWTO: Setup a single memcached server with Slicehost

Posted on April 9, 2009.

I just went through these steps to set up an instance of memcached on my Slicehost account to support Pop Answers, which has grown out of its single-server setup. Here are the steps, using a 512M instance with Debian 5.0:

cd /usr/local/src/
wget http://www.monkey.org/~provos/libevent-1.4.9-stable.tar.gz
tar zxvf libevent-1.4.9-stable.tar.gz
cd libevent-1.4.9-stable
apt-get install gcc gcc++
apt-get install make
./configure
make && make install

Don't know if this is necessary, but I followed the steps on Lullabot to configure the libevent path. Then:

cd /usr/local/src
wget http://memcached.googlecode.com/files/memcached-1.2.7.tar.gz
tar zxvf memcached-1.2.7.tar.gz
cd memcached-1.2.7
./configure
make && make install

Then, I just start the memcached daemon:

cd /
memcached -d -m 512 -p 11211 -u nobody

Now I can use this instance from my Pop Answers web server for all of my caching needs :)

Get a trackback link

1 Comments

  1. Wing Lian on June 14, 2009

    Might I recommend binding memcached to a private IP address? better for security (don't want people telnet'ing to the public ip:11211 and flushing memcached ;) try

    memcached -d -u nobody -p 11211 -t 4 -m 512 -l ifconfig eth1 | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'

Leave a comment

Use Markdown or basic HTML. For posting code, use Postable. Please keep comments respectful and on topic.