Install APC on UBUNTU with PHP

August 4th, 2012 by Laeeq | No comments

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.

APC can significantly speed up your PHP applications, by caching both PHP code and user variables. Adding APC to an application usually results in improved application response times, reduced server load and happier users.

Here in this post I will explain how to install APC with PHP.

1. First we will install the required packages:
  1. sudo apt-get install php-pear php5-dev apache2-threaded-dev

2. Now Install APC:
  1. sudo pecl install apc-3.1.6

3. Create file /etc/php5/conf.d/apc.ini with the following content:
  1. extension=apc.so

4. Restart Apache:
  1. sudo /etc/init.d/apache2 restart

After restarting the Apache2 web server APC section will be included in PHP.INI. you can see in phpinfo() output.

php apc installed

You can subscribe to PHPZAG.COM posts by Email

 

Related Topics:

 

 

  1. No comments yet.
  1. No trackbacks yet.