This article covers the basics of setting of the APC PHP Cache on your Ubuntu Linux machine with the Apache web server. These instructions will also work for a variety of other linux distributions as well. This is part of our series on setting up a Linode VPS with a fully working PHP, Apache, MySQL setup with multiple domains.
The following articles may be of interest to you:
Basic Linode VPS Setup
PHP, Apache, MySQL Setup on Ubuntu
Drupal Setup on Ubuntu
APC, or the “Alternative PHP Cache” is a php module that can significantly effect performance on sites that makes heavy use of PHP, such as Drupal. Below you will find the steps necessary to install and enable the APC Cache on an Ubuntu server.
1. Install APC PHP Cache and Related Tools
sudo aptitude install php-pear
sudo aptitude install php5-dev (if not already)
sudo aptitude install apache2-dev
sudo pecl install apc
sudo echo "extension=apc.so" > /etc/php5/apache2/conf.d/apc.ini
restart apache /etc/init.d/apache2 restart