[Ubuntu] Memcache

Memcache

Overview

Memcache is a free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

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.

Installation from Linux Packages

Ubuntu & Debian

code:

apt-get install memcached libmemcached php5-memcached

Redhat/CentOS

code:

yum install memcached

Installation from EasyApache (WHM/cPanel)

EasyApache MemCache is the Apache module rather than the PHP module as we do not list or provide the PHP module there. When you compile EasyApache with the MemCache Apache module, you end up with it available via Apache only not via PHP. 

1. Please refer to the wiki article on EasyApache Build

Select the php addon "mod_mem" when building in EasyApache

After installing these components, then create the following file:

Code:

echo "/usr/local/lib/" > /etc/ld.so.conf.d/libevent-x86_64.conf

Run the following:

Code:

ldconfig

memcached -d -u nobody -m 1024 127.0.0.1 -p 11211

Test to make sure it is installed:

Code:

root@host [~]# php -i | grep -i memcached

memcached

memcached support => enabled

libmemcached version => 1.0.4

Registered save handlers => files user sqlite memcached

Was this article helpful?
0 out of 0 found this helpful