Tuesday, April 12, 2011

Install PHP APC on RHEL and CentOS

Install prerequisites: (note that on RHEL you need to enable the Optional server repo for php-devel, rhn-channel --add --channel=rhel-x86_64-server-optional-6)
yum install gcc php-pear php-devel httpd-devel pcre pcre-devel

Install APC with pear:
pear install pecl/apc

Tell PHP to load the APC module. Create /etc/php.d/apc.ini
echo "extension=apc.so" > /etc/php.d/apc.ini

Restart Apache

No comments: