Install PHP accelerator php APC

apt-get install -y php-apc
 
# configure apc
echo "apc.shm_size=128" >> /etc/php5/conf.d/apc.ini
 
# configure kernel shm
cat <<EOF>> /etc/sysctl.conf
kernel.shmall = 134217728
kernel.shmmax = 134217728
EOF
sysctl -p /etc/sysctl.conf
 
# restart apache
/etc/init.d/apache2 restart
 
# configure magento to use apc
cp /var/www/app/etc/local.xml.additional  /var/www/app/etc/local.xml.additional.org
diff ./app/etc/local.xml.additional.org ./app/etc/local.xml.additional -Naur
--- ./app/etc/local.xml.additional.org	2011-09-08 11:38:11.000000000 +0200
+++ ./app/etc/local.xml.additional	2011-09-08 11:41:33.000000000 +0200
@@ -35,7 +35,8 @@
         <session_save_path><![CDATA[]]></session_save_path><!-- e.g. for memcache session save handler tcp://10.0.0.1:11211?persistent=1&weight=2&timeout=10&retry_interval=10 -->
         <session_cache_limiter><![CDATA[]]></session_cache_limiter><!-- see http://php.net/manual/en/function.session-cache-limiter.php#82174 for possible values -->
         <cache>
-            <backend></backend><!-- apc / memcached / empty=file -->
+            <backend>apc</backend><!-- apc / memcached / empty=file -->
+            <prefix>MAGE_</prefix>
             <memcached><!-- memcached cache backend related config -->
                 <servers><!-- any number of server nodes can be included -->
                     <server>
 
 
# view APC statistics
gunzip /usr/share/doc/php-apc/apc.php.gz -c > /var/www/apc.php
https://www.example.com/apc.php
 
# test
/etc/php5/conf.d/apc.ini
#?# apc.ttl=0
#?# apc.mmap_file_mask=/tmp/apc.XXXXXX
 
 
# Links
http://magebase.com/magento-tutorials/speeding-up-magento-with-apc-or-memcached/
http://www.squatlabs.com/performance/apc-richtig-konfigurieren
http://www.howtoforge.com/apc-php5-apache2-fedora8