Nerdy cat

a software engineer by day
but is afraid of mouse by night,meowww =>.<=

my FaceBook

Installing and using memcache on ubuntu and debian

To install memcached, simply run the following command:

sudo apt-get install memcached

Once it’s installed, edit /etc/memcached.conf and change the line beginning ‘-m’ which is the amount of memory (in megabytes) to allocate to the server. You can also change the IP address that the server listens on  in the line beginning -l.
Now restart the daemon by running

/etc/init.d/memcached restart

To start the new memcache manually using the following command:

/usr/local/bin/memcached -d -u root -m 512 -p 11211

Now you have memcache set up and running on your server. A great feature of memcached is that you can easily cluster servers. If you want to do this, simply install memcache on your other servers before continuing.

blog comments powered by Disqus