The first thing we should do is install rpmforge repo if still not, you can use this .
the next step is installing memcached and libmemcache
yum install libmemcache memcached -y
starting memcached:
memcached -d -m 256 -l 127.0.0.1 -p 11211 -u nobody
you can add a line above to /etc/rc.local to start memcached daemon at system startup
now we will install memcache php extension
wget http://pecl.php.net/get/memcache-2.1.2.tgz
tar -xvf memcache-2.1.2.tgz && cd memcache-2.1.2
phpize && ./configure --enable-memcache && make && make install
echo "extension=memcache.so" >> `php -i | grep "Loaded Configuration File" | awk '{print $5}'`
tar -xvf memcache-2.1.2.tgz && cd memcache-2.1.2
phpize && ./configure --enable-memcache && make && make install
echo "extension=memcache.so" >> `php -i | grep "Loaded Configuration File" | awk '{print $5}'`
and restart apache: /etc/init.d/httpd restart
and now the task is done. enjoy it!
PS: sorry for terrible english.
Похожие записи: