Page 1 of 3

how to install Memcached and APC?

Posted: Sat May 17, 2014 6:27 am
by kudouyuzi
how to install Memcached and APC?

Re: how to install Memcached and APC?

Posted: Sat May 17, 2014 12:48 pm
by ahmiq
+1 , i am using centos 6.5 64 bit

Re: how to install Memcached and APC?

Posted: Sat May 17, 2014 12:58 pm
by kudouyuzi
ahmiq wrote:+1 , i am using centos 6.5 64 bit
me too

Re: how to install Memcached and APC?

Posted: Sat May 17, 2014 2:00 pm
by ahmiq
Try at your own risk. I tried like this and it works for me. without any problems

1)

Code: Select all

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)

Code: Select all

pecl install apc
3)

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] :
Just press enter for all

4)now we need to put into php.d

Code: Select all

echo "extension=apc.so" > /etc/php.d/apc.ini
5)

Code: Select all

service httpd restart
OR
/etc/init.d/httpd restart
6)
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 needs

Code: Select all

cp /usr/share/pear/apc.php /home/admin/web/website.com/public_html
8) Edit the apc.php for username and password:

Code: Select all

nano /home/admin/web/website.com/public_html/apc.php
and change this:

Code: Select all

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

Re: how to install Memcached and APC?

Posted: Sat May 17, 2014 3:29 pm
by kudouyuzi
ahmiq wrote:Try at your own risk. I tried like this and it works for me. without any problems

1)

Code: Select all

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)

Code: Select all

pecl install apc
3)

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] :
Just press enter for all

4)now we need to put into php.d

Code: Select all

echo "extension=apc.so" > /etc/php.d/apc.ini
5)

Code: Select all

service httpd restart
OR
/etc/init.d/httpd restart
6)
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 needs

Code: Select all

cp /usr/share/pear/apc.php /home/admin/web/website.com/public_html
8) Edit the apc.php for username and password:

Code: Select all

nano /home/admin/web/website.com/public_html/apc.php
and change this:

Code: Select all

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
thanks

Re: how to install Memcached and APC?

Posted: Sat May 17, 2014 3:31 pm
by pedagang
debian
apt-get install memcached

centos
yum install memcached

Re: how to install Memcached and APC?

Posted: Sat May 17, 2014 4:08 pm
by demian
short way from CenOS

if php -v

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  
But i don't recommend used apc, better use php-pecl-zendopcache (faster and stable)

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
note: don't use apc and zendOpCache at the same time

Re: how to install Memcached and APC?

Posted: Sun May 18, 2014 1:46 am
by kudouyuzi
Which one?

Re: how to install Memcached and APC?

Posted: Mon May 19, 2014 2:22 pm
by marcelocaetano
How to install APC and memcached on Debian 7 with VestaCP? What risks have doing this?

# Portuguese Brazil
Como instalar o APC e memcached no Debian 7 com VestaCP? Quais riscos tenho fazendo isto?

Re: how to install Memcached and APC?

Posted: Wed May 21, 2014 9:39 pm
by imperio
We don't recommend to using APC on your servers