Install and Integrate eAccelerator into PHP5 on Debian Squeeze

Valic —  June 18, 2011 — 2 Comments

eAccelerator is a free open-source PHP accelerator & optimizer. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.

eAccelerator stores compiled PHP scripts in shared memory and executes code directly from it. It creates locks only for a short time, while searching for a compiled PHP script in the cache, so one script can be executed simultaneously by several engines. Files that can’t fit in shared memory are cached on disk only.

The latest release,, features support for PHP 5.3 and also works with PHP 5.1 and 5.2.

1. Installation:

apt-get update && apt-get upgrade && apt-get install php5-dev

Now  you  have to download and install eAccelerator from the eAccelerator website.

Now Install eAccelerator using the following commands:

cd /usr/src
tar -xvfj eaccelerator-
cd eaccelerator-
make install

2. Integrate eAccelerator in PHP5:

In Debian Squeeze the configuration files for the PHP 5 modules are stored in the /etc/php5/conf.d directory.

Create eaccelerator.ini file :

cd /etc/php5/conf.d/
touch eaccelerator.ini

Now ddd the following lines to /etc/php5/conf.d/eaccelerator.ini:


Now create the /var/cache/eaccelerator directory and make it writable:

mkdir -p /var/cache/eaccelerator
chmod 0777 /var/cache/eaccelerator

3. Restart apache2:

/etc/init.d/apache2  restart

NOTE: Create one file named phpinfo.php and put the following content in it:

Open phpinfo.php file  in your browser. Now search for eAccelerator module.
You should now see eAccelerator mentioned on the page which means it has successfully been integrated and is working as expected.

You can also check if you can check if eAccelerator is running by executing:

php -v

When eAccelerator is loaded successfully you will see something like:

PHP 5.3.3-7+squeeze1 with Suhosin-Patch (cli) (built: Mar 18 2011 17:22:52)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator


Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

2 responses to Install and Integrate eAccelerator into PHP5 on Debian Squeeze

  1. WOW, great website, great articles, thanks


  2. SerInformaticos October 10, 2011 at 08:55


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.