Setting up memcached

From Dreamwidth Notes
Jump to: navigation, search

First, install memcached:

sudo apt-get install memcached

Then, look at /etc/memcached.conf. Look for where it says:

# Default connection port is 11211
-p 11211

Either note this number or change it to a number you do want, as long as it's not the same as the Apache port number or another port number you are using.

Then, look at $LJHOME/etc/config-local.pl to make sure the port number on this line:

@MEMCACHE_SERVERS = ('127.0.0.1:11211');

Matches the one in /etc/memcached.conf.

You can then start memcached with:

/etc/init.d/memcached start

If you're on a Dreamhack and running it from the command line, use something like:

memcached -d -m 8 -l 127.0.0.1 -p portnum