Haven’t worked with CentOS for a long time. Miss the time and the teammates in HKU CECID.
Here are the steps to install Alternative PHP Cache (APC) on CentOS.
1. Install the following packages.
yum install php-pear php-devel httpd-devel pcre-devel gcc make
2. Install APC with PECL.
pecl install apc
3. You will be asked a few questions. Just use the default settings.
Enable internal debugging in APC [no]: Enable per request file info about files Used From The APC cache [no]: Enable spin locks (EXPERIMENTAL) [no]: Enable memory protection (EXPERIMENTAL) [no]: Enable pthread mutexes (default) [yes]: Enable pthread read / write locks (EXPERIMENTAL) [no]:
4. Include the APC extension in php.ini by creating the /etc/php.d/apc.ini.
echo "extension = apc.so" > /etc/php.d/apc.ini
5. Restart Apache.
Reference: CentOS 6 – Install APC