Can we get a tutorial for setting up LEMP stacks with APC instead of xcache?
-
APC is going to be included in PHP 6, and I'd guess it has been chosen for good reason... so I'm hopeful to see a tutorial for using APC instead of xcache
Posted 1 year ago # -
noted OSB
Posted 1 year ago # -
actually, i'm reading that APC will be integrated in PHP 5.4 now.
Posted 1 year ago # -
I just installed it on my box and got dramatic performance increase on my website that uses the EE2.1 CMS - before the homepage was using 5MB of memory with xcache ...and now it's using 1MB with APC. And load time is much faster (done a load test with siege).
first, remove all instances of xcache from your php.ini file then...
wget http://pecl.php.net/get/APC-3.1.4.tgz
tar zxvf APC-3.1.4.tgz
cd APC-3.1.4
phpize
./configure --enable-apc --enable-mmap
make
make installnano /etc/php/php.ini
Added this to the end
[apc]
extension=/path/that/you/got/from/make/install/apc.so
apc.enabled=1
apc.shm_size=50M (I got 1GB of RAM, you might want to set it to 30M if you got less)/etc/init.d/nginx restart
/etc/init.d/php-fpm restartthen check phpinfo() to make sure it's enabled
also another fyi... if your still in the APC-3.1.4 folder, there is a file called apc.php that you can copy into your web folder and can access via browser. To be able to clear opcode cache, you need to nano apc.php and change the default login
Posted 1 year ago #
Reply
You must log in to post.
Want HTML?
a blockquote code em strong ul ol liPlace code between backticks `codeHere`
You've got it.
