Follow these steps to install APC on a RHEL 5 server.
1. Install php-devel for phpize (if not installed).
yum install php-devel
2. Install the apache devel pkgs for apxs (if needed).
yum install httpd-devel
3. Make /tmp executable.
mount -o remount,exec /tmp
4. Set the memory limit in /usr/share/pear/pearcmd.php to 16M.
vi /usr/share/pear/pearcmd.php
@ini_set('memory_limit', '16M');
@ini_set('memory_limit', '16M');
5. Install apc.
pecl install apc
6. Add a /etc/php.d/apc.ini with the following line:
extension=apc.so
7. Restart apache (check configuration first for errors).
service httpd configtest (watch for errors)
service httpd restart
service httpd restart
Remove the ini_set and set /tmp back to noexec.