These instructions have not been updated for the new single-instance optimizations in the latest Memcache module for Drupal. |
yum install --enable=epel memcached |
service memcached start |
telnet localhost 11211 |
Ctrl
+ ]
and type quit
to end the test.service memcached stop |
Use one of the following methods.
yum install --enable=remi php-pecl-memcache |
service httpd restart |
yum install php-pear httpd-devel zlib-devel |
pear install pecl/memcache |
echo "extension=memcache.so" > /etc/php.d/memcache.ini |
service httpd restart |
<?php phpinfo(); |
sites/all/modules/memcache
, just as you would for any module. Do not "install" the module from Drupal's module administration page.Table |
Instance |
---|---|
cache |
default |
cache_filter |
filter |
cache_page |
page |
Table |
Instance |
---|---|
prefix_cache |
default |
prefix_cache_filter |
filter |
prefix_cache_page |
page |
service memcached start |
chkconfig memcached on |
settings.php
file.$conf
array, add these keys to the exiting one. If not, create a $conf
array.$memcached_port = 11211; $conf = array( 'cache_inc' => './sites/all/modules/memcache/memcache.inc', 'memcache_servers' => array( 'localhost:' . $memcached_port++ => 'default', // Servers/instances configured here ), 'memcache_bins' => array( 'cache' => 'default', // Bins assigned here ), ); |
'localhost:' . $memcached_port++ => 'instance-name', |
'cache_instance-name' => 'instance-name', |
settings.php
file on each Apache host:
$conf = array( 'cache_inc' => './sites/all/modules/memcache/memcache.inc', 'memcache_servers' => array( '10.0.0.1:11211' => 'default', '10.0.0.1:11212' => 'block', '10.0.0.1:11213' => 'content', '10.0.0.1:11214' => 'filter', '10.0.0.1:11215' => 'form', '10.0.0.1:11216' => 'menu', '10.0.0.1:11217' => 'page', '10.0.0.1:11218' => 'update', '10.0.0.1:11219' => 'views', '10.0.0.2:11211' => 'default', '10.0.0.2:11212' => 'block', '10.0.0.2:11213' => 'content', '10.0.0.2:11214' => 'filter', '10.0.0.2:11215' => 'form', '10.0.0.2:11216' => 'menu', '10.0.0.2:11217' => 'page', '10.0.0.2:11218' => 'update', '10.0.0.2:11219' => 'views', ), 'memcache_bins' => array( 'cache' => 'default', 'cache_block' => 'block', 'cache_content' => 'content', 'cache_filter' => 'filter', 'cache_form' => 'form', 'cache_menu' => 'menu', 'cache_page' => 'page', 'cache_update' => 'update', 'cache_views' => 'views', ), ); |