installing APC & uploadprogress on CentOS 5 [updated]

First, we need the pecl command so we can download and install APC from the repositories. I use the “remi” repo to give me the latest packages, so use “–enablerepo=remi” if you have it installed.

yum install php-pear
But, this will not run on its own, we need the following package for the phpize command:

yum install php-devel
We also need the apxs command, which is installed via the following package:

yum install httpd-devel
Now we have all the software we need, so we install apc via the pecl command:

pecl install apc

I also recommend installing uploadprogress, because Drupal 6 will ask you to do so.

pecl install uploadprogress

Now we have to enable apc and uploadprogress in php.ini.

Add the following lines to /etc/php.ini or wherever your php config file is located.

extension=apc.so

extension=uploadprogress.so

Then we restart Apache:

/etc/init.d/httpd start
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.

Popularity: 2% [?]

  • http://www.mitchmckenna.com Mitchell McKenna

    My team's using CentOS for our latest project. My first time using it, love it!

  • frankleng

    i know eh. CentOS is awesome. very easy to learn and setup.

  • http://www.mitchmckenna.com Mitchell McKenna

    My team's using CentOS for our latest project. My first time using it, love it!

  • frankleng

    i know eh. CentOS is awesome. very easy to learn and setup.

  • http://binarygangster.com/ binary gangster

    Thank you very much. I actually ran into an issue where my server didn't have a compiler installed yet, therefore I wasn't able to get phpize working until i added gcc.

  • guest

    thanks a lot, shortly and exactly what I need

  • Vahid

    Thank you. This post helps me

See also: