How to install APC (Alternative PHP Cache) for VestaCP , Centos 6.5

1)
yum --enablerepo=remi install php-pear php-devel httpd-devel pcre-devel gcc make

I already had some packages installed so it wasnt a problem. I use vesta cP uses new php http so if you use simple yum it will give dependency errors , change it if you already installed any of the above package
2)
pecl install apc

3)
sample output here:
Enable internal debugging in APC [no] :
Enable per request file info about files used from the APC cache [no] :
Enable spin locks (EXPERIMENTAL) [no] :
Enable memory protection (EXPERIMENTAL) [no] :
Enable pthread mutexes (default) [yes] :
Enable pthread read/write locks (EXPERIMENTAL) [no] :

Just press enter for all

4)now we need to put into php.d
echo "extension=apc.so" > /etc/php.d/apc.ini

5)

service httpd restart
OR
/etc/init.d/httpd restart

6)
verify if it installed correctly

php -i | grep apc

7) ENABLE THE APC Administration panel:
To enable the administration panel we need to copy apc.php to the website home , in my case it is /home/web/test/public_html/ , change according to your needs
cp /usr/share/pear/apc.php /home/web/test/public_html/

8) Edit the apc.php for username and password:

nano /home/web/test/public_html/apc.php

and change this:
defaults('ADMIN_USERNAME','apc'); // Admin Username
defaults('ADMIN_PASSWORD','Set-Password-Here'); // Admin Password - CHANGE THIS TO ENABLE!!!

9)

Goto your website and you can see the output

website.com/apc.php

Leave a Reply

Your email address will not be published. Required fields are marked *