Home > Installation, PHP > How to install memcache

How to install memcache

December 28th, 2011 Leave a comment Go to comments

How to install memcache


Memcache is a high-performance memory object caching system intended to speed up dynamic web applications by alleviating database load. Memcache is extremely fast. It uses libevent, which provides a mechanism to execute a callback function when a specific event occurs on a file descriptor, to scale to any number of open connections. On a modern Linux system memcached utilizes epoll, is completely non-blocking for network I/O, ensures memory never gets fragmented, and uses its own slab allocator and hash table to achieve 0(1) virtual memory allocation.

How it install memcache:

#curl -O http://monkey.org/~provos/libevent-1.4.9-stable.tar.gz

#tar -xzvf libevent-1.4.9-stable.tar.gz

#cd libevent*



#make install

Now let’s download the newest Memcached source

#curl -O http://www.danga.com/memcached/dist/memcached-1.3.0.tar.gz

#tar zxf memcached-1.3.0.tar.gz

#cd memcached-1.3.0



#make install

Then add /usr/local/lib to LD_LIBRARY_PATH in your .bash_profile


Add the below link in php.ini of the server


Now restart Apache:

Service httpd restart

Once it sucussfully install you can create phpinfo() on your webserver should now confirm that memcache is installed.


Categories: Installation, PHP Tags:
  1. No comments yet.
You must be logged in to post a comment.
%d bloggers like this: