Install memcached with:
sudo apt-get install memcached
Default config should have settings to listen to localhost on port 11211. /etc/memcached.conf:
-l 127.0.0.1
-p 11211
For CKAN/Beaker to talk to it, you'll need Python module pylibmc and libmemcached. Install libmemcached2 first and see which version comes with your distro:
sudo apt-get install libmemcached2
Lucid comes with v0.31-1 which needs pylibmc no later than version 0.9. If you have 0.32 then you can use a more recent pylibmc. Now install pylibmc:
pip install pylibmc==0.9
Then in your ckan config you set up Beaker to talk to it like this:
beaker.session.type = ext:memcached
beaker.session.url = 127.0.0.1:11211
Once you restart you should be using Beaker, instead of creating those files that eventually completely fill your disk.