Download from http://memcached.org/
Download and untar that
./configure
make
make install
If it asks for libevent use
yum install libevent libevent-devel -y
OR
Download http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
Or use http://community.singlehop.com/community-tutorials/304-memcached-cpanel.html
==========
Error
error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
# cd /etc/ld.so.conf.d/
# vi libevent-i386.conf or vi libevent-x86_64.conf
/usr/local/lib/ —> Content of above file
# ldconfig
# memcached -d -u nobody -m 1024 127.0.0.1 -p 11211
Download the latest stable version of memcache from PECL :: Package :: memcache
wget http://pecl.php.net/get/memcache-2.2.5.tgz
tar xvf memcache-2.2.5.tgz
cd memcache-2.2.5
phpize
./configure && make && make install
Open /usr/local/lib/php.ini
extension=memcache.so
Now restart apache
root# php -f test.php | grep “memcache support”
memcache support => enabled