Memcached is a software that implements a RAM caching service based on a hash table.

You can also install this application at one-click checkout
Detailed description of this One-Click-Apps

Memcached is a server that stores some data in RAM with a specified lifetime. The data is accessed by a key (name). You can think of Memcached as a hash table stored on the server. It's mostly used to cache web page code, database query results, etc.

Go to "Web Server Settings → PHP", highlight the desired version of PHP and click the Extensions button


In the list that opens, select memcache or memcached, highlight it, and click Install




yum install memcached.x86_64 php-pecl-memcache.x86_64  

Edit the configuration file /etc/sysconfig/memcached:

  • PORT="11211"
  • USER="memcached"
  • MAXCONN="2048"
  • CACHESIZE="4096"
  • OPTIONS="-l" - listens to localhost

Add it to the autostart and run it:

chkconfig memcached on  
/etc/init.d/memcached start

Restart Apache:

/etc/init.d/httpd restart

Check that the daemon is loaded:

php -m | grep memcache  


Find the memcached package from the repository:

aptitude search memcache  


apt-get install memcached php5-memcache  

Check that memcached works:

memcached -u www-data -vv  

If there is a similar output:

slab class 1: chunk size 80 perslab 13107  
slab class 2: chunk size 104 perslab 10082  
slab class 3: chunk size 136 perslab 7710  
slab class 4: chunk size 176 perslab 5957  
slab class 5: chunk size 224 perslab 4681  
... skip ...
<28 server listening (udp)
<27 server listening (udp)
<28 server listening (udp)

If not, then:

ldconfig -v  
killall memcached  
/etc/init.d/memcached start

Perform an Apache reboot:

/etc/init.d/apache2 restart

Check that the module is loaded:

php -m | grep memcache  


Update the list of packages:

apt-get update  

Install the extension and the daemon:

apt-get install memcached php5-memcache  

Restart the Memcached and Apache services:

/etc/init.d/memcached restart
/etc/init.d/apache2 restart
Updated Jan. 2, 2019