Next Tutorial
Drupal 7 Tutorial Part 15: Drupal 7 Advanced Taxonomy Concepts
How to Install PHP APC on linux to improve drupal performance
Hi Everyone,
Alternative PHP Cache (APC) is a free, open source framework that optimizes PHP intermediate code and caches data and compiled code from the PHP bytecode compiler in shared memory, which will save the compile time of php code and increases the drupal performance which is built using php.
In this article i am going to specify how to install and how to optimize the APC for Drupal.
Step 1:
To install APC we need PECL command. For this we need to install some packages. Run the below command to install php-pear, and php5-dev packages.
~$>sudo aptitude install php-pear
~$>sudo aptitude install php5-dev
Step 2:
We also need the apxs command, which is installed via the following package:
~$>sudo aptitude install apache2-dev
Step 3:
Lets install APC now.
~$>sudo pecl install apc
Step 4: Now we need to enable in APC in apache2 php.ini configuration file.
Open the file using the command. ~$>sudo gedit /etc/php5/apache2/php.ini
And add the line extension=apc.so
Now restart the apache using the command ~$>sudo /etc/init.d/apache2 restart
Now you are done. And you can see the improved performance of your drupal site :-)
Cheers,
Anil Sagar

Recent comments
1 day 4 hours ago
1 day 19 hours ago
3 days 12 hours ago
5 days 9 hours ago
5 days 17 hours ago
1 week 6 days ago
1 week 6 days ago
2 weeks 3 days ago
2 weeks 3 days ago
4 weeks 1 day ago