How to install APC & Uploadprogress on Centos 5

User login

First things first, we need the pecl command in order to download and install APC from the repositories.

Let's run the following command in our terminal:

yum install php-pear

Then, we are making availlable a required package for the phpize command:

yum install php-devel

The followng package will allow apxs command:

yum install httpd-devel

Once we have all the above pakages installed, we are ready to install apc by running the pecl command:

pecl install apc

Drupal 6 recommends installing uploadprogress, so let's go ahead and do it:

pecl install uploadprogress

Now we have to enable apc and uploadprogress in php.ini, by adding the following lines to /etc/php.ini:

All done! As a last step we should restart Apache:

/etc/init.d/httpd start

A phpinfo file will display a new block, titled APC. Check it to see if APC is installed properly.
We can now enjoy faster executions and decreased memory usage :)

In order to update APC, you could use the following command: pecl install -f apc

Apache, CentOS, PHP / MySQL, Server configuration