Home > Linux / Unix, Ubuntu > Installing eAccelerator In Ubuntu Server

Installing eAccelerator In Ubuntu Server

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

Step-By-Step Command Line Installation

Download the latest version from eAccelerator website.

Change directory to home/user directory

Make sure you are in your own user directory, to do this use something like the following:

cd /usr/home/username

Download and extract file

Download and extract version….

wget http://bart.eaccelerator.net/source/
tar xvf eaccelerator-
cd eaccelerator-

Build and install

To use the following phpize and php-config commands you will need to have the PHP development package installed, in Ubuntu you can install the PHP5 development package using:

sudo apt-get install make php5-dev

After checking that this is installed you can continue:

sudo phpize
./configure –enable-eaccelerator=shared
sudo make clean
sudo make
sudo make test
sudo make install

Check install location

Check the install area by changing directories:

cd /usr/lib/php5/

In this directory you should see a folder named like a date string – eg… “20060613”. Remember the folder name, you may need to use this to point to the eaccelerator.so file in the configuration options below.

Add configuration options for eAccelerator to php.ini

Change to the PHP config directory and open the php.ini file for editing:

cd /etc/php5/apache2
sudo vi php.ini

Add the following to end of php.ini file changing folder names appropriately, do not worry if the cache_dir directory does not exist on your system we will create it next:

; eAccelerator configuration
; Note that eAccelerator may also be installed as a PHP extension or as a zend_extension
; If you are using a thread safe build of PHP you must use
; zend_extension_ts instead of zend_extension
;extension = “/usr/lib/php5/20060613+lfs/eaccelerator.so”
zend_extension = “/usr/lib/php5/20060613/eaccelerator.so”
eaccelerator.shm_size = “16”
eaccelerator.cache_dir = “/var/cache/eaccelerator”
eaccelerator.enable = “1”
eaccelerator.optimizer = “1”
eaccelerator.check_mtime = “1”
eaccelerator.debug = “0”
eaccelerator.filter = “”
eaccelerator.shm_max = “0”
eaccelerator.shm_ttl = “0”
eaccelerator.shm_prune_period = “0”
eaccelerator.shm_only = “0”
eaccelerator.compress = “1”
eaccelerator.compress_level = “9”
eaccelerator.allowed_admin_path = “/var/www/eaccelerator”

Create cache directory

The next very important step is creating the cache directory that you configured in the previous step. The default value is /tmp/eaccelerator. It’s easy because it’s writeable to everyone,

Next we will create the cache directory used configured in the previous step:

sudo mkdir /var/cache/eaccelerator

This directory must be writeable by the user eAccelerator runs under (usually www-data):

sudo chmod 0777 /var/cache/eaccelerator

For additional security we could change the owner of the directory to the same user eAccelerator runs under and set 0644 permissions:

sudo chown www-data:www-data /var/cache/eaccelerator
sudo chmod 0644 /var/cache/eaccelerator

Restart Apache

Restart Apache:

sudo /etc/init.d/apache2 restart

[Source: eAccelerator – Installing from source]

  1. Thomas Topan
    December 29, 2010 at 6:11 am

    I wanted to share a cheaper web host with you… I know how hard it is to find a good cheap webhost. http://www.wildgriffinmedia.com

  2. January 13, 2011 at 7:42 am

    Thanks… helpful tutorial

  3. Dale Davies
    January 14, 2011 at 8:26 pm

    This appears to be an exact copy of my own tutorial published here…


    You could have at least corrected my spelling before publishing my work as your own.

  4. April 8, 2016 at 6:08 pm

    Guter Ansatz, diesen Vortrag werden ich mir nicht entgehen lassen.https://ameo.link/berrymorrison8988808180

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: