Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jun 022009
 

How to compile APC module for PHP

Answer:

The following steps works in RHEL/CentOS

1. Download the latest APC from PECL

wget http://pecl.php.net/get/APC

2. Extract the APC source package and compile/install it

tar -xvf APC
cd APC-X.X.X (replace with your downloaded version)
phpize
./configure
make && make install

3. Enable APC in PHP configuration

echo "extension=apc.so" > /etc/php.d/apc.ini

4. Restart the httpd and use phpinfo() to verify if APC is running

Mar 142009
 

Install APC for PHP on Ubuntu

Answer:

APC is a very fast byte-code caching module for PHP. (It will become part of PHP6 in the future). By installing it, the performance of your PHP codes can be speed up by 200-300%.

To install it under Ubuntu,

# sudo apt-get install php-apc

Then restart Apache,

# sudo /etc/init.d/apache2 restart

See also: Compile/Install APC on RedHat/CentOS/Fedora Linux