This is the first step to boost your drupal site (or any other aplications using PHP). More ways to improve your site are to come.
APC (Alternative PHP Cache) is a PHP extension that will boost up your php scripts. It is part of PECL (a repository for PHP Extensions)
- First off all install apache2-threaded-dev with the following command:
#apt-get install apache2-threaded-dev - You will also need the package php5-dev (source needed for compiling additional modules)
#apt-get install php5-dev - Then install the apc extension with the pecl command:
#pecl install apc - The cleanest solution to include this extension into the php core is to create a file (for example:apc.ini) in the /etc/php5/cond.d directory.
#cd /etc/php5/conf.d
#touch apc.ini
The minimal command in this file must be: extension=apc.so - Restart your apache browswer.
- When you need to update your apc code simply use this command:
#pecl upgrade apc
A very interessant benchmark has been made; APC has been compared with other 2 php accelerators.
For those of you using ubuntu 10.xx release of ubuntu, there is a package for the apc:
- #apt-get install php-apc
And that's it.
i am getting error as E:
i am getting error as
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Post new comment