Installing APC Opcode cache on CentOS 5 64-bit

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 "" > /etc/php.d/apc.ini
  6. Then we restart Apache:
    /etc/init.d/httpd restart

( Ali Han, )

  • centos
  • 3 Người xem đã đánh giá bài viết này hữu ích
Bài viết này có hữu ích với Bạn?

Related Articles

This copy of Windows must be activated with Microsoft before you can continue

This is the solution to activate Windows (XP, Vista, 7, 8 – Server...

Fixing Windows Server 2008 R2 Boot Problem

I was playing around with a couple of Windows Server 2008 R2 virtual machines today, and...

Gene6 error: Local FTP service could not be started

Go in your RemoteAdmin folder, and open Remote.iniUnder [Server] search for...

How do I edit a file through SSH using Nano?

The following article explains how to edit a file using Nano. This first requires you to...

How to install suphp in directadmin

Directadmin came with php ad CLI options. So the php scripts run as apache user.  You can use...