23Systems Web Devsign

Custom website design and development

  • Plugins
  • Services
  • Portfolio
  • Contact
  • Donate
  • Forums

Installing Alterative PHP Cache (APC) with Plesk on Ubuntu

You are here: Home » Linux » Apache » Installing Alterative PHP Cache (APC) with Plesk on Ubuntu
 

Posted on July 24th, 2009 | by Dan Zappone

Parallels Plesk

Parallels Plesk

Ubuntu Linux

Ubuntu Linux

Alternative PHP Cache (APC) is a PHP accelerator. PHP accelerators are extensions built to increase the performance and decrease the load time of software applications written using the PHP programming language. Most PHP accelerators work by caching the compiled bytecode of PHP scripts to avoid the overhead of parsing and compiling source code on each request. A PHP accelerator typically reduces server load and increases the speed of PHP code anywhere from 2-10 times.

APC is a free, open source accelerator that optimizes PHP intermediate code and caches data and compiled code from the PHP bytecode compiler in shared memory.

This should improve performance on both physical and virtual hosted machines. These instructions are aimed at Plesk users but should be easily adapted to any Debian based installation.

To install APC the first course of action you will need to take is enter the following command on your server:

sudo apt-get install php-pear php5-dev gcc apache2-threaded-dev

Once that has completed you should be able to run the following:

pecl install apc

You should see something like this:

downloading APC-3.0.19.tgz ...
Starting to download APC-3.0.19.tgz (115,735 bytes)
.........................done: 115,735 bytes
47 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
1. Use apxs to set compile flags (if using APC with Apache)? : yes
 
1-1, 'all', 'abort', or Enter to continue:

Hit Enter

Next you will need to enable the extension, use vi or nano or whatever your favorite text editor for Linux is.

sudo vi /etc/php5/conf.d/apc.ini

At the very minimum you will need to add the follow to the file:

extension=apc.so
apc.enabled=1
apc.shm_size=30

There are numerous options for APC so please see the following http://us3.php.net/manual/en/apc.configuration.php for details

Copy the apc.php file to your website:

sudo cp /usr/share/php/apc.php /var/www/vhosts/domain.tld/httpdocs

Edit the apc.php file and change the default username and password. These must be changed inorder to login to the APC control panel.

sudo vi /var/www/vhosts/domain.tld/httpdocs/apc.php
defaults('ADMIN_USERNAME','apc'); 			// Admin Username
defaults('ADMIN_PASSWORD','password');  	// Admin Password - CHANGE THIS TO ENABLE!!!

After that issue the following command

sudo /etc/init.d/apache2 restart

You should be good to go and APC should be running. To verify got to yourdomain.tld/apc.php.

Related entries:

  • FLIR Installation
  • Speeding Up WordPress
  • Services
  • Share this on del.icio.us
  • Digg this!
  • Post this on Diigo
  • Share this on Reddit
  • Stumble upon something good? Share it on StumbleUpon
  • Share this on Technorati
  • Share this on Mixx
  • Tweet This!
  • Subscribe to the comments for this post?
  • Add this to Mister Wong
  • Share this on Facebook
  • Seed this on Newsvine
  • Add this to Google Bookmarks
  • Share this on Bebo
  • Promote this on Orkut
  • Share this on Tumblr

Posted in Apache, Linux, Wordpress, development | No Comments »
Tags: alternative php cache, Apache, apc, Linux, plesk, ubuntu

 

« Previous post
Next post »

Leave a Reply

Click here to cancel reply.

 
  • Meta

    Login form protected by Login LockDown.


    • Register
    • Lost your password?
    • Entries RSS
  • Tag cloud

    downloads typo3 faq JQuery MediaWiki automatic facelift image replacement donate Linux framework flirstyle lightbox twitter ajax javascript Apache image overlay joomla safari blogs images picture firefox installation Web design change log symfony sites Wordpress Lightbox Plus Web 2.0 php resources 23Systems users opera gallery flir colorbox Themes actionable integration cakephp photo Plugins image plesk development web presence templates design blog programming facelift web browsers ie 6 web development drupal facebook menus
  • Categories

    • 23Systems
    • Apache
    • design
    • development
    • Facelift Image Replacement
    • Lightbox Plus
    • Linux
    • MediaWiki
    • php
    • Plugins
    • Themes
    • Tweaks
    • Wordpress
 
  • Become a Fan/Follow Us

    Follow us on Twitter Fan us on Facebook
  • Affiliate Programs

    Please consider purchasing one of their awesome WordPress product through the links below as a way to support 23Systems' development of free WordPress plugins!
    Digging Into WordPress - WordPress In Depth
  • Gravity Forms - WordPress Form Managment
  • WordPress Defender - 30 Security Strategies for WordPress
  • Forum List

    • 23Systems General (3)
    • WordPress Plugins (0)
    • Lightbox Plus (234)
      Questions, answers and general informations about the Lightbox Plus plugin for WordPress
    • Facelift Image Replacement (23)
      Questions, answers and general information about the Facelift Image Replacement (FLIR) plugin for WordPress
    • Actionable (1)
      Questions, answers and general informations about the Actionable plugin for WordPress
    • Feature Suggestions (10)
      Suggest new features for Lightbox Plus
Entries (RSS) and Comments (RSS).
© 2010 23Systems.