Free & open source, high-performance, distributed memory object caching system
Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
Installing Memcached using YUM
If you are using Centos or RHEL, you need to install the RPMforge rpm to install the packs. Go to http://dag.wieers.com/rpm/FAQ.php#B2 and download/install the correct rpm/arch belongs to your server.
yum install memcached
yum install libmemcache
Installing Memcached from source
cd ~/memcache
wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
tar zxvf memcached-1.4.5.tar.gz
cd memcached-1.4.5
./configure --with-lib-event=/usr/local/
make
make install
Installing libmemecached
cd ~/memcache
wget http://monkey.org/~provos/libevent-1.4.14b-stable.tar.gz
tar zxvf libevent-1.4.14b-stable.tar.gz
cd libevent-1.4.14b-stable
./configure
make
make install
Staring the memcached as daemon process
It is advisable to run/start the memcached process as non-root user, you can use the nobody user/group to start.
memcached -d -u nobody -m 1048 -p 11211 127.0.0.1
Install the Memcache PECL Extension for PHP
Even though memcached is happily running on the server, it’s not accessible from PHP without the PECL extension. Fortunately this is a very easy process, just use the pecl command.
pecl install memcache
Then add the memcache extension to your global php.ini file.
extension=memcache.so
Now restart web server.
contact@webhostingsupport.info
Recent Comments