23Systems Web Devsign

Custom website design and development

  • Home
  • 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 Friday, July 24th, 2009 04:02 pm GMT -5 | 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

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

 

« Previous post
Next post »

One Response to “Installing Alterative PHP Cache (APC) with Plesk on Ubuntu”

  1. David Hudson says:
    Monday, March 29th, 2010 10:13 am GMT -5 at 10:13 am

    Worked like a charm! Thanks

    Reply

Leave a Reply

Click here to cancel reply.

 
  • Meta

    Login form protected by Login LockDown.


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

    javascript picture users facelift php development ajax blog images Themes lightbox actionable image overlay safari automatic colorbox photo photos Web design video gallery forums facelift image replacement image Plugins web development Wordpress flir design bbpress Apache JQuery Lightbox Plus change log 23Systems
  • Categories

    • 23Systems
    • Apache
    • design
    • development
    • Facelift Image Replacement
    • Lightbox Plus
    • Linux
    • MediaWiki
    • php
    • Plugins
    • Support
    • 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
  • Related Links

    • ColorBox
    • Facelift Image Replacement
    • Typeface
  • Wordpress

    • Development Blog
    • Documentation
    • Plugins
    • Suggest Ideas
    • Support Forum
    • Themes
Entries (RSS) and Comments (RSS).
    Anti-spam Policy | Disclaimer | E-mail Policy | Privacy Policy | Terms Of Use | © 2010 23Systems.