APC is a free and open PHP5 opcode cacher for caching & optimizing PHP5 intermediate code.
It is similar to other PHP5 opcode cachers, such as eAccelerator & XCache.
1. Install APC on Debian:
APC is a PHP5 extension and we will install it using PECL.For that we need to install APC dependencies:
apt-get install php5-dev apache2-prefork-dev build-essential
Now install APC:
pecl install apc
2. Enable APC:
After install you need to enable APC. Add the following line in php.ini file:
echo “extension=apc.so” >>/etc/php5/apache2/php.ini
3. Restart apache2 and verify if APC is running:
And to verify APC create one file called phpinfo.php in /var/www/ directory .
and paste the fllowing:
Now navigate to http://your-ip/phpinfo.php and you should now see APC mentioned on the page which means it has successfully been installated.