Home > Tutorials > How-to install eAccelerator?

How-to install eAccelerator?

January 30, 2011 4 Comments »

Tags: cache cent-os eaccelerator php ubuntu

I’m using eAccelerator on two servers now, for both I’m using DirectAdmin as control panel. One is based on Ubuntu and the other one is running on Cent-OS.

Download eAccelerator from their website and follow their instructions (you need root access to install eAccelerator and it’s required to install php5-dev tools first):

wget http://bart.eaccelerator.net/source/
tar xjvf eaccelerator-
cd eaccelerator-
./configure --with-php-config=/usr/local/php5/bin/php-config

The “–with-php-config” setting is maybe not necessary, check your server for the right location.

It might be possible that you need to install the PHP dev tools first (yum install php-devel (Cent-OS or apt-get install php-dev)


make test

before you run

make install

If you get a message like

[eAccelerator] This build of “eAccelerator” was compiled for PHP version 5.2.14. Rebuild it for your PHP version (5.2.17) or download precompiled binaries.

you need to start over with

phpize --clean

If all warnings/messages after running the “make test” function are gone, continue:

Open the php.ini file (in my case: /usr/local/etc/php5/cgi/php.ini) and add the following settings at the end of the file:


The value for “zend_extension” might be different, check the location first (you get the right value after “make install” is done).

Next we need to create the cache directory:

mkdir /var/cache/eaccelerator
chmod 0777 /var/cache/eaccelerator

Warning: 0777 permissions are for the lazy ones, you should use a less permitted level (if you can). This is the advice from the eAccelerator website:

A safer and cleaner way would be to change the owner of the directory to the same user PHP runs as (most of the time the same user as Apache or Lighttpd) and set 0644 permissions.

retstart the web server using
/ect/init.d/httpd restart

and your ready! Check your php configration using “phpinfo()” and check also the cache location for newly created directories.

Check the eAccelerator website for more information.

Written by .

Comments: 4

Leave my own
  1. admin Reply
    July 16, 2011 at 10:09 pm

    Today I noticed that the download URL doesn’t work. Use the SF url instead:


  2. Pete Reply
    September 9, 2011 at 8:24 pm

    The download from sourceforge is a zip file, you need to install “unzip” first:
    apt-get install zip (unzip is installed automatically)
    Then use
    unzip eaccelerator- to extra the zip archive

  3. finalwebsites Reply
    September 14, 2011 at 1:35 pm

    I noticed that file locations are very different for Ubuntu and CentOS.
    I use this command to find for example “phpize”
    $ sudo locate phpize

    It’s possible that you need to install “locate” first:
    $ sudo apt-get install locate

  4. Olaf Reply
    February 10, 2012 at 11:54 am

    If you update PHP5, don’t forget to re-compile “eAccelerator” or otherwise PHP will disable the extension.
    I’m running automatic updates on several Ubuntu based servers and I replaced “eAccelerator” with APC (Alternative PHP Cache). It’s much easier to install, the performance is great too and updates are done by APT. If you like to do the same follow these steps.
    1. remove the eAccelerator settings from the php.ini file
    2. reload the Apache service
    3. Remove the .so file (check the file location inside the php.ini file)
    4. remove the cache directory and eventually the installation files.
    5. Install APC with “apt-get install php-apc”.

    That’s all, I found this opcode cache performance comparision @stackoverflow.com

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>