This will guide you how to install PHP APC on Centos Linux. You may be aware that APC is little bit older and it is replaced by APCu.
If you really need to install APC, most of following steps are same, only thing you have to do it download latest stable APC version 🙂
1) Download latest APCu
https://pecl.php.net/package/APCu
2) Install PHP APCu
latest available version at the moment of writing is 4.0.7 .
1 2 3 4 5 6 7 |
#tar -zxvf apcu-4.0.7.tgz #cd apcu-4.0.7 #phpize #./configure --enable-apcu --enable-apc-bc --enable-apc-mmap --with-php-config=/usr/local/apache2/php/bin/php-config #make #make test #make install |
Use following command to find out location of php-config file and append that path to –with-php-config .
1 |
#find / -name 'php-config' |
3) configure PHP with APCu
Open php.ini file and add following line
extension=apcu.so
4) Verification
Restart the Apache server and open phpinfo page. then search apc , phpinfo gives you “apc” as emulated and apcu version. I hope this would help you !!