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 (189) - yum apc (137) - centos apc (92) - php apc install (77) - centos php apc (76) - centos install apc (72) - install php apc (66) - install APC centos (61) - php apc rpm (61) - php apc centos (53) - apxs centos (43) - php-apc rpm (35) - installing apc centos (34) - pear install APC (33) - yum install apc (29) - apc install (29) - apc yum (28) - centos apc install (27) - apc php centos (25) - centos apxs (25) - apc apxs (25) - install apc on centos (25) - apc rpm (23) - yum install json (22) - php apc (22) - php apc rhel (20) - install apc php (20) - install apxs centos (19) - php-apc centos (18) - yum install pecl (18) - APC RHEL (18) - yum json (17) - yum install php json (17) - yum install php-json (17) - rhel php apc (17) - pecl install apc apxs (17) - pecl install apc (17) - pear apc install (17) - centos php json (16) - PECL rhel (16) - rhel apc (16) - centos install php apc (16) - rhel install APC (16) - No package httpd-devel available. (16) - centos APC rpm (16) - yum install apxs (15) - no package httpd-devel available (15) - php install apc (15) - php apc redhat (15) - json centos (13) - rhel pecl (13) - php json centos (13) - installing pear on centos (13) - centos install apxs (13) - install php apc centos (13) - Installing PHP APC (13) - install apc redhat (13) - RHEL apxs (12) - pear centos (12) - installing APC on centos (12) - yum php json (11) - centos php-json (11) - APC install centos (11) - yum install php-apc (11) - yum install php apc (11) - install apc rhel (10) - install apc (10) - apxs centos 5 (10) - centos php (10) - install pear centos (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) - installing apc in centos (9) - yum php-apc (9) - apxs apc (9) - APC rpm centos (9) - apc centos rpm (9) - json php-devel (9) - yum php-json (8) - yum install json php (8) - install php-apc (8) - APC rhel5 (8) - centos install pear (8) - pecl apc apxs (8) - centos php apc install (8) - centos 5 install apxs (8) - centos 5 php apc (8) - redhat php apc (8) - install json centos (7) - centos apc yum (7) - rhel apc php (7) - install apc with pear (7) - install apc php centos (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) - json rhel (6) - php-json centos 5 (6) - pecl json centos (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) - php apc centos 5 (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 pear (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) - RHEL php (5) - centos install php json (5) - centos install json (5) - pecl install apc rhel (5) - APC PHP RHEL (5) - install apc centos 5 (5) - pecl apxs (5) - php centos (5) - php apc rhel5 (5) - yum install memcached centos (5) - pecl install apc centos (5) - install apc on rhel (5) - install json PHP Version 5.1.6 (5) - apc for centos (5) - install apc for php (5) - php apc on centos (5) - install PHP Centos (4) - php json rpm (4) - yum json php (4) - PHP json yum (4) - install JSON centos 5 (4) -