Install APC (Alternative PHP Cache) in RHEL/CentOS 6/5 & Fedora 20-12

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

Ravi Saive

Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.

Host Your Own Website at $97 Discount + One Free Domain Using our Promo Code 'Tec97' (Enter this code during Signup) - Signup with DreamHost Now!

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

You may also like...

21 Responses

  1. Cecilia Ryan says:

    Thank you Ravi or this tutorial very detailed and easy to follow can now sort out the caching problem on our new server.

  2. Guillermo says:

    Excellent thank you

  3. John says:

    Installed with no problems. Thanks

  4. Sami says:

    Hi,
    Thakns for this nice tutorial.
    APC is now installed but it seems not to work : the uptime value is always 0, so I think APC is not working ! How can I check if it really caches my magento site ?
    Regards :)

  5. Satya says:

    Hi ravi,

    I am having some problem with APC working properly. File cache always shows Hits = 1 and misses keep increasing, but at the same time, the cached file entries show some numbers in hundreds over some time.

    User cache entries shows to be working normally it seems.

    But almost twice a day i keep getting Internal server error and then have to restar php-fpm.

    I hv allocated 1024M memory and some other regular config stuff.

    If you have more idea, can i have your email ID to discuss this and send you more details about it.

    Warm rgds
    Satya

  6. IPC Oye says:

    @katal2hod:
    First, make sure you already have these things installed on your Centos:
    make, gcc, php-devel, php-pear.
    And then, type “pecl install uploadprogress”
    You should see something like this after the installation has finished:
    Build process completed successfully
    Installing ‘/usr/lib64/php/modules/uploadprogress.so’
    install ok: channel://pecl.php.net/uploadprogress-1.0.3.1

    Note that I’m using Centos 64 bit, if you’re using 32 bit, then the path will show
    Installing ‘/usr/lib/php/modules/uploadprogress.so’

    Then, use “vi /etc/php.ini” (or Nano, or VIM)
    Add this line on the bottom:
    extension=uploadprogress.so
    Save and close, then restart your Apache by using service httpd restart
    Done ;)

  7. IPC Oye says:

    @Andre Luis de Andrade:
    APC works by storing the compiled bytecode of your PHP script on the memory, so next time when a request for the same page appears, APC will provide the cached code instead of re-read and recompile the code again from your disk, thus increasing the load speed.

  8. Hello!

    OK! APC is installed and I can view the Statistics.

    And now, how APC will cache my PHP sites?

    The APC is not creating /etc/apc.* files.

    The statistics is displaying NO PHP FILES cached.

    Thanks a lot. I want to understand how APC works.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Join Over 70000+ Linux Users
  1. 48590
  2. 2375
  3. 13200
Enter your email to get latest Linux Howto's