This is how you can install APC and it works out of box:
First, we need the pecl command so we can download and install APC from the repositories.
Do to so, we execute the following command:
aptitude install php-pear
But, this will not run on its own, we need the following package for the phpize command:
aptitude install php5-dev
We also need the apxs command, which is installed via the following package:
aptitude install apache2-dev
Now we have all the software we need, so we install apc via the pecl command:
pecl install apc
Once that finishes, we need to enable apc in Apache's configuration. the following command should do this for us.
echo "extension=apc.so" > /etc/php5/apache2/conf.d/apc.ini
Then we restart Apache:
/etc/init.d/apache2 restart
And we are all done. Watch for less execution time per page, and decreased memory usage per Apache process compared to what you had before. Tested on Debian Lenny, but orginal author says this works in Ubuntu too http://2bits.com/articles/installing-php-apc-gnulinux-ubuntu-gutsy-gibbon-710-and-debian.html
Nice guide :)
/me wonders it should be left here or moved to Tips & Tricks...
Yeah, that isnt my tutorial, but id like to share it because if you follow those simple instructions, it works right away :)
Quote from: The Grinch on December 19, 2009, 07:50:42 PM
/me wonders it should be left here or moved to Tips & Tricks...
How about creating tips and tricks for server performace in here? Sticky with links maybe?
Hmm, we do already have a number of stickies as it is.
I need to update APC, but I have no idea how to do that... :-[
This shows up in my APC-INFO: You are running an older version of APC (3.0.19), newer version 3.1.3 is available at http://pecl.php.net/package/APC/3.1.3
APC isn't updated on #yum update.
Reposities doesnt alwways have latest versions.
That is pretty cool! I wanna try this..
/me goes and wonder's how to get ubuntu/debain installed on centOS and then kick centOS out.. :P
Quote from: Øwdy on April 30, 2010, 04:02:53 PM
Reposities doesnt alwways have latest versions.
Thanks for answering. I noticed on http://pecl.php.net/package/APC that version 3.1.3 is a beta.
I guess "Yum update" will work on the next stable version.
Thanx for the guide Øwdy
:)
my forum is in a hosting, and the hosters say that all the cache systems supported bay smf are supported by their servers (hosting).
but how do i select apc in the smf configuration?? it only let me select the level
http://a.imageshack.us/img90/9057/screenshotieb.png
Your hosts are probably lying if they say all cache systems are supported. Just select a level from the dropdown
thx level 1 selected! thats enough ?