Sunday, January 10, 2010

Install Memcached caching sytem in centos from source

memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

It is mainly used in MYSQL + PHP or MYSQL + JAVA applications which are quite database intensive.


yum -y install libevent libevent-devel

Download Source

tar zxf memcached-1.4.4.tar.gz
cd memcached-1.4.4
./configure && make && make install

Test the installation

memcached -m 256 -u nobody -vv
slab class 1: chunk size 80 perslab 13107
slab class 2: chunk size 104 perslab 10082
<29 send buffer was 110592, now 268435456
<29 server listening (udp)
<29 server listening (udp)

Start the Daemon

memcached -d -m 256 -u nobody -p 11211 -l

The above command will start the memcached daemon in port 11211

Ensure that it is working.

netstat -plan|grep 11211
tcp 0 0* LISTEN 7049/memcached

Thats it.. Enjoy the power of caching system..

1 comment:

  1. Thanks this was very useful link on Memcached.. Thanks for posting it