Installing APC
- March 27th, 2008
- Posted in LAMP . System Administration
- By jrod
- Write comment
APC (http://us2.php.net/apc, http://en.wikipedia.org/wiki/PHP_accelerator) is a bytecode caching mechanism for php that greatly increase the performance of php applications. APC is available from pecl and easy to install on most LAMP platforms.
pear channel-update pecl.php.net
mount -o remount,exec /tmp
pecl install apc
mount -o remount,noexec /tmp
echo "extension=apc.so" >/etc/php.d/apc.ini
echo "apc.shm_size=128" >>/etc/php.d/apc.ini
Please keep in mind, apc.ini must reside in a directory that is scanned by php. Also, RHEL3-4 users may have issues updating pear.
On RHEL3, something like this will happen:
pear upgrade pear
pear install something
-bash: pear: command not found
pear will then need to be installed manually:
lynx -source http://pear.php.net/go-pear | php -q
On RHEL4, the issue is that the url had changed to grab packages from pear.php.net. This can be resolved by upgrading to the latest version of pear using the full URL:
pear upgrade http://pear.php.net/get/pear http://pear.php.net/get/dependency
No comments yet.