How to install APC on linux server
An open-source, free opcode cache for PHP is called the Alternative PHP Cache (APC). Its objective is to offer a stable, open-source, and cost-free framework for PHP intermediate code optimization and caching.
Download latest APC from pecl.
# cd /usr/local/src/
# wget http://pecl.php.net/get/APC
Extract the downloaded APC and compile it.
# tar -xvf APC
# cd APC-*
# phpize
# ./configure
# make && make install
Now, you will have to enable the extension in php.ini on your server. Below command will give you the exact server’s php.ini
# php -i | grep php.ini
Add “extension=apc.so” & restart apache.
To check if it is compiled properly, use command below OR create a phpinfo & check the output.
# php -i | grep apc
You can install APC on our VPS Hosting & Dedicated Servers.