Installing PHP APC On RHEL/CentOS

  1. Yum up some packages:
    yum install php-pear php-devel httpd-devel
  2. Install APC using pear (the pear installer is smarter than the pecl installer):
    When the installer asks about APXS, say ‘no’. 

    pear install pecl/apc
  3. Tell PHP to load APC:
    echo extension=apc.so > /etc/php.d/apc.ini
  4. Restart Apache:
    /sbin/service httpd graceful

9 Comments

  1. Thanks. Very simple, very clear, very complete directions. Are you sure you are a linux guy? They are going to revoke your group membership privileges if you don’t make these directions either partially incomplete or somewhat arcane.

  2. @Mark:

    Thanks, but don’t worry for me. These directions will become incomplete and misleading as soon as the underlying OS changes.

  3. Many thanks. I agree with Mark. After seeing so many ridiculously complicated explanations of the above simple process I can only say again – thank you for you help and effort.

  4. [...] Casey actually has some instructions that provide a more elegant method of installing APC on CentOS or [...]

  5. Hi Casey,
    Can you explain why you choose “no” for APXS?

    Thanks,
    -mike

  6. Thanks for this!

  7. Very clear.
    Good job.

  8. @Mike: Because there had to be at least one unexplained, obscure thing in a Linux related post?

    Casey, I’d love to know the answer to Mike’s question as well. Did testing having answered ‘yes’ reveal subtle weirdness? Did things blow up spectacularly? Or does that let you avoid pulling in httpd-devel and all the compiler-related dependencies that that brings in?

    Cheers (and add my thanks to the list!),

    Justin

    • @Justin:

      My first few tries were with APXS, but they failed (can’t remember errors). It didn’t blow up so bad that I couldn’t try again, it just didn’t work.


Comments RSS TrackBack Identifier URI

Leave a comment

 

User contributed tags for this post:

apc centos (188) - yum apc (124) - centos apc (91) - centos php apc (75) - php apc install (72) - centos install apc (68) - install php apc (60) - php apc rpm (58) - install APC centos (57) - php apc centos (53) - apxs centos (42) - installing apc centos (34) - php-apc rpm (34) - apc install (29) - pear install APC (28) - yum install apc (28) - centos apc install (26) - centos apxs (25) - apc yum (24) - apc apxs (24) - install apc on centos (23) - yum install json (22) - apc php centos (22) - apc rpm (22) - php apc (21) - php apc rhel (20) - install apc php (18) - yum install pecl (18) - install apxs centos (18) - yum json (17) - yum install php-json (17) - rhel php apc (17) - PECL rhel (16) - yum install php json (16) - centos install php apc (16) - rhel install APC (16) - APC RHEL (16) - centos APC rpm (16) - centos php json (15) - rhel apc (15) - No package httpd-devel available. (15) - pecl install apc apxs (15) - php install apc (15) - php apc redhat (15) - php-apc centos (14) - yum install apxs (14) - pecl install apc (14) - pear apc install (14) - json centos (13) - rhel pecl (13) - php json centos (13) - installing pear on centos (13) - centos install apxs (13) - RHEL apxs (12) - pear centos (12) - install php apc centos (12) - Installing PHP APC (12) - installing APC on centos (12) - install apc redhat (12) - yum php json (11) - centos php-json (11) - install apc rhel (10) - yum install php-apc (10) - apxs centos 5 (10) - centos php (10) - yum install php apc (10) - install pear centos (10) - no package httpd-devel available (10) - php apc installation (10) - centos apc php (10) - centos json (9) - php-json centos (9) - json centos 5 (9) - centos 5 php json (9) - APC install centos (9) - apxs apc (9) - APC rpm centos (9) - apc centos rpm (9) - json php-devel (9) - yum install json php (8) - APC rhel5 (8) - centos install pear (8) - pecl apc apxs (8) - install apc (8) - yum php-apc (8) - centos 5 install apxs (8) - centos 5 php apc (8) - yum php-json (7) - centos apc yum (7) - rhel apc php (7) - install php-apc (7) - installing apc in centos (7) - install apc php centos (7) - centos php apc install (7) - installing pear centos (7) - apc php rpm (7) - apc on centos (7) - centos php-apc (7) - install apxs centos 5 (7) - centos php apc rpm (7) - redhat php apc (7) - json rhel (6) - php-json centos 5 (6) - json php centos (6) - yum install pear (6) - yum apc centos (6) - centos yum apc (6) - how to install apc on centos (6) - download php for centos (6) - install php on centos (6) - centos install php (6) - rhel5 php apc (6) - install apc yum (6) - how to install php apc (6) - php apc pecl (6) - RHEL5 yum install php-JSON (6) - install apc centos 4 (6) - php-apc rpm centos (6) - yum php apc (6) - Centos (5) - php json centos 5 (5) - rhel php json (5) - rhel json (5) - install json centos (5) - centos install php json (5) - centos install json (5) - pecl install apc rhel (5) - install apc centos 5 (5) - pecl apxs (5) - install apc with pear (5) - php centos (5) - php apc rhel5 (5) - yum install memcached centos (5) - pecl install apc centos (5) - php apc centos 5 (5) - install apc on rhel (5) - install json PHP Version 5.1.6 (5) - apc for centos (5) - install apc for php (5) - install apc pear (5) - php apc on centos (5) - install PHP Centos (4) - php json rpm (4) - yum json php (4) - RHEL php (4) - PHP json yum (4) - install JSON centos 5 (4) - centos 4 php-json (4) - download php for centos 5 (4) -