HOWTO: install APC on Debian or Ubuntu

Started by Owdy, December 19, 2009, 06:17:35 PM

Previous topic - Next topic

Owdy

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
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Arantor

Nice guide :)

* The Grinch wonders it should be left here or moved to Tips & Tricks...

Owdy

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
* The Grinch 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?
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Arantor

Hmm, we do already have a number of stickies as it is.

_Ziggy_

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.
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

Owdy

Reposities doesnt alwways have latest versions.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Adish - (F.L.A.M.E.R)

That is pretty cool! I wanna try this..

* (F.L.A.M.E.R) goes and wonder's how to get ubuntu/debain installed on centOS and then kick centOS out.. :P

_Ziggy_

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.
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

knightofdoom

Glory is fleeting, but obscurity is forever.
Web Designer Sri Lanka

emicd

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

Joshua Dickerson

Your hosts are probably lying if they say all cache systems are supported. Just select a level from the dropdown
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

emicd


Advertisement: