Tuesday, March 13, 2012

How to Enable the memcache Extension in php?

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.

Here i have showed how to install the memcached and extension for php.

1.Install Memcached:

Download the repo from the EPEL.

#rpm -Uhv http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

And use yum to install the memcahed

#yum -y install memcached

After installing you can start the memcached service as follow.

#/etc/init.d/memcached start

2.Install the memcached php extension :

Download The memcached.

#wget http://pecl.php.net/get/memcached

#tar -zxvf memcached

#cd memcache-3.0.6

#phpize && ./configure --enable-memcache && make

#make install

After installing the memcache php enable the extension on php.ini as

#vim /etc/php.ini


And restart the httpd server.

No comments:

Post a Comment