Make the Sources Folder
mkdir ~/memcache
Compile and Install LibEvent
cd ~/memcache
wget http://www.monkey.org/~provos/libevent-1.4.9-stable.tar.gz
tar xvfz libevent-1.4.9-stable.tar.gz
cd libevent-1.4.9-stable
./configure
make
make install
Compile and Install Memcache
cd ~/memcache
wget http://www.danga.com/memcached/dist/memcached-1.2.6.tar.gz
tar xvfz memcached-1.2.6.tar.gz
cd memcached-1.2.6
./configure –with-lib-event=/usr/local/
make
make install
Starting Memcache
memcached
If you get the following error then you may beed to register libevent:
error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
Register LibEvent
vi /etc/ld.so.conf.d/libevent-i386.conf
Open above file and put the line /usr/local/lib/ and save the file and fire below command.
ldconfig
Installing PHP Memcache
cd ~/memcache
wget http://pecl.php.net/get/memcache-3.0.3.tgz
tar xvfz memcache-3.0.3.tgz
cd memcache-3.0.3
phpize
./configure
make
make install
vi /usr/local/lib/php.ini
–[paste]–
extension=memcache.so
–[/paste]–
service httpd restart
Thats All….