Quantcast
Channel: Eureka! » PHP
Viewing all articles
Browse latest Browse all 16

CentOS – Install Alternative PHP Cache (APC)

$
0
0

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.

/etc/init.d/httpd restart

 

6. Verify the installation in phpinfo().
centos-php-apc-installation
 

Done =)

Reference: CentOS 6 – Install APC


Filed under: Linux, PHP Tagged: Alternative PHP Cache, CECID, CentOS, Linux, PHP

Viewing all articles
Browse latest Browse all 16

Trending Articles