PHP applications of all kinds, whether they are framework or CMS (Drupal, WordPress(cache plugins: W3 Total Cache, Wp Super cache vs), Joomla) based, can gain a lot of high performance benefits from running a PHP opcode accelerators/cache.

APC (Alternate PHP Cache),
Alternate PHP Cache, is now the most maintained free(open source) opcode cache, and is being used more and more as it emerges to be the most stable.

The instructions here detail how to get APC running on a CentOS 5 server. First, we need the pecl command so we can download and install APC from the repositories (Please connect ssh root access).

  1. Do to so, we execute the following command:
    yum install php-pear
  2. But, this will not run on its own, we need the following package for the phpize command:
    yum install php-devel
  3. We also need apxs, which is installed via the following package:
    yum install httpd-devel
  4. Now we have all the software we need, so we install apc via the pecl command:
    pecl install apc
  5. Once that finishes, we need to enable apc in Apache’s configuration. the following command should do this for us.
    echo "extension=apc.so" > /etc/php.d/apc.ini
  6. Then we restart Apache:
    /etc/init.d/httpd restart

( Ali Han, URI:alihan.com.tr/blog )

Bài viết này có hữu ích với Bạn? 3 Người xem đã đánh giá bài viết này hữu ích (5 Điểm)