how to install Memcached and APC?
Posted: Sat May 17, 2014 6:27 am
how to install Memcached and APC?
Community Forum
https://forum.vestacp.com/
me tooahmiq wrote:+1 , i am using centos 6.5 64 bit
Code: Select all
yum --enablerepo=remi install php-pear php-devel httpd-devel pcre-devel gcc make
Code: Select all
pecl install apc
Code: Select all
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] :
Code: Select all
echo "extension=apc.so" > /etc/php.d/apc.ini
Code: Select all
service httpd restart
OR
/etc/init.d/httpd restart
Code: Select all
php -i | grep apc
Code: Select all
cp /usr/share/pear/apc.php /home/admin/web/website.com/public_html
Code: Select all
nano /home/admin/web/website.com/public_html/apc.php
Code: Select all
defaults('ADMIN_USERNAME','apc'); // Admin Username
defaults('ADMIN_PASSWORD','Set-Password-Here'); // Admin Password - CHANGE THIS TO ENABLE!!!
thanksahmiq wrote:Try at your own risk. I tried like this and it works for me. without any problems
1)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 packageCode: Select all
yum --enablerepo=remi install php-pear php-devel httpd-devel pcre-devel gcc make
2)3)Code: Select all
pecl install apc
Just press enter for allCode: Select all
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] :
4)now we need to put into php.d5)Code: Select all
echo "extension=apc.so" > /etc/php.d/apc.ini
6)Code: Select all
service httpd restart OR /etc/init.d/httpd restart
verify if it installed correctly
Code: Select all
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 needs8) Edit the apc.php for username and password:Code: Select all
cp /usr/share/pear/apc.php /home/admin/web/website.com/public_html
and change this:Code: Select all
nano /home/admin/web/website.com/public_html/apc.php
9)Code: Select all
defaults('ADMIN_USERNAME','apc'); // Admin Username defaults('ADMIN_PASSWORD','Set-Password-Here'); // Admin Password - CHANGE THIS TO ENABLE!!!
Goto your website and you can see the output
website.com/apc.php
Code: Select all
php -v
return version 5.4
yum install --enablerepo=remi php-pecl-apc php-pecl-memcache memcached libmemcached -y
_________________________
php -v
return version 5.3
yum install php-pecl-apc php-pecl-memcache memcached libmemcached -y
Code: Select all
php -v
return version 5.4
yum install --enablerepo=remi php-pecl-zendopcache -y
___________________
php -v
return version 5.4
yum install php-pecl-zendopcache -y