Fedora memcache + drupal walkthrough 1) Have a look at the background reading A - http://www.danga.com/memcached/ (cache daemon) B - http://pecl.php.net/package/memcache (PHP integration for memcache) C - http://drupal.org/project/memcache (Drupal Module to use memcache) 2) Fedora RPMs are available for A and B above http://dag.wieers.com/rpm/packages/memcached/ http://dag.wieers.com/rpm/packages/php-pecl-memcache/ I downloaded the SRPMs and rebuilt them. This may require installing some extra RPMs into your system - rpm will tell you. 1003 wget http://dag.wieers.com/rpm/packages/memcached/memcached-1.2.1-4.rf.src.rpm 1004 rpmbuild --rebuild memcached-1.2.1-4.rf.src.rpm 1005 yum install libevent-devel 1006 rpmbuild --rebuild memcached-1.2.1-4.rf.src.rpm 1008 wget http://dag.wieers.com/rpm/packages/php-pecl-memcache/php-pecl-memcache-2.0.4-1.rf.src.rpm 1009 rpmbuild --rebuild php-pecl-memcache-2.0.4-1.rf.src.rpm 1010 yum install php-devel 1011 rpmbuild --rebuild php-pecl-memcache-2.0.4-1.rf.src.rpm 3) Installed RPMS [root@yoursite ~]# rpm -Uvh /usr/src/redhat/RPMS/x86_64/memcached-1.2.1-4.rf.x86_64.rpm /usr/src/redhat/RPMS/x86_64/php-pecl-memcache-2.0.4-1.rf.x86_64.rpm Preparing... ########################################### [100%] 1:php-pecl-memcache ########################################### [ 50%] 2:memcached ########################################### [100%] [root@yoursite ~]# 4) Verify configuration. Change if required. [root@yoursite ~]# cat /etc/sysconfig/memcached PORT="11211" USER="nobody" MAXCONN="1024" CACHESIZE="64" OPTIONS="" [root@yoursite ~]# 5) Activate memcache [root@yoursite ~]# service memcached start Starting Distributed memory caching (memcached): [ OK ] [root@yoursite ~]# service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ] [root@yoursite ~]# Check phpinfo() for memcached status. Mine said memcache memcache support enabled Active persistent connections 0 Revision $Revision: 1.53 $ 6) Download, install, follow steps in README.txt (move include file, patch bootstrap.inc, configure settings.php) [simon@yoursite ~]$ cd /home/WHOEVER/www/SOMEWEBSITE.com/html/modules/ [simon@yoursite modules]$ wget -q http://ftp.osuosl.org/pub/drupal/files/projects/memcache-5.x-1.x-dev.tar.gz [simon@yoursite modules]$ tar xfz memcache-5.x-1.x-dev.tar.gz [simon@yoursite modules]$ cd memcache [simon@yoursite memcache]$ mv memcache.inc ../../includes/ [simon@yoursite memcache]$ patch -p0 -d ../.. < bootstrap.patch patching file includes/bootstrap.inc [simon@yoursite modules]$ Apply the default configuration to the bottom of your DRUPAL/sites/default/settings.php file. If you have already configured $cfg, you will need to add the element to the array instead of appending the whole $cfg [simon@yoursite memcache]$ tail -3 ../../sites/default/settings.php $conf = array( 'memcache_servers' => array('default' => array('localhost' => array(11211))) ); [simon@yoursite memcache]$ Additionally, the patch doesn't seem to remove use of the old cache.inc, which causes some "Cannot redeclare cache_get()" errors. Remove the following line from DRUPAL/include/bootstrap.inc (about like 845 at time of writing) require_once variable_get('cache_inc', './includes/cache.inc'); 7) Optional. To get full advantage from memcached, you should probably patch 'node' and 'path' modules [simon@yoursite memcache]$ patch -p0 -d ../.. < node.patch patching file modules/node/node.module [simon@yoursite memcache]$ patch -p0 -d ../.. < path.patch patching file includes/path.inc patching file modules/path/path.module [simon@yoursite memcache]$ You may also want to replace DRUPAL/include/session.inc with session-memcache.inc from the memcache module. This enables the use of memcached for sessions. 8) Optional. Install and enable 'devel' module. Configure it to show SQL queries being executed. Log in, and check out / and /admin - see how many SQL queries are run. In my case / took 156 queries, and /admin took 91. 9) Enable the drupal module from /admin/build/modules (it's in the "Other" section). Check if the number of sql queries above are any less (click a couple of times to allow the cache to populate)