How to Install Alternative PHP Cache (APC) on Ubuntu

apc php

apc php

The Alternative PHP Cache (APC) is a free and open opcode cache for PHP.

Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.

To install APC, do the following commands:

# aptitude install php-pear
# aptitude install php5-dev
# aptitude install apache2-dev
# pecl install apc
# echo "" >> /etc/php5/apache2/conf.d/apc.ini
# /etc/init.d/apache2 restart

Update Feb 25, 2012:

I found one liner APC installation from

$ sudo apt-get install php-apc

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.