Wednesday, 17 July 2013

Drupal - Installing and Configuring APC

  1. Steps to Install APC Extension for PHP
    a) apt-get install php-apc
    b) service apache2 restart
    c) edit "/etc/php5/conf.d/apc.ini" file and add the below lines manually
    extension=apc.so apc.enabled = 1 apc.shm_size = 512M
    d) service apache2 restart

  2. Steps to Enable and Configure APC Drupal Module
  3. Goto Admin -> Modules[admin/modules]
  4. Enable "Alternative PHP Cache" module
  5. Add the following lines to "Settings.php" file at the end
    /**
    * Add APC Caching.
    */
    $conf['cache_backends'] = array('sites/all/modules/apc/drupal_apc_cache.inc');
    $conf['cache_class_cache'] = 'DrupalAPCCache';
    $conf['cache_class_cache_bootstrap'] = 'DrupalAPCCache';
    //$conf['apc_show_debug'] = TRUE; // Remove the slashes to use debug mode.
    $conf['page_cache_without_database'] = TRUE;
    $conf['page_cache_invoke_hooks'] = FALSE;
  6. Enabled "APC Status" module (Libraries module need to enable by Dependency)
  7. Create a directory named "APC" in sites/all/libraries/APC. (Note the capitalization -- the directory name is case sensitive).
  8. Rename apc.php to apc.php.inc and place it in the APC directory.
    Follow the below commands for this step:
    $ mkdir -p sites/all/libraries/APC
    $ cd sites/all/libraries/APC
    $ curl http://svn.php.net/viewvc/pecl/apc/trunk/apc.php?view=co \
    > apc.php.inc
  9. Check the APC configurations and Info page,
  10. Go to Admin -> Reports -> Status Report, there we can find the APC with Enabled status. Click on Enabled link, it will redirect to APC Info page.

No comments:

Post a Comment

Thank you so much for providing your valuable feedback. I will will look into them and update my skills & technologies accordingly.