How to install Eaccelerator
What is Eaccelerator?
eAccelerator is a free open-source PHP accelerator, optimizer, and dynamic content cache. 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.
Install instructions
- Login as root
- Download Eaccelerator
- Extract and move into the directory
- Locate where php is
- Create configuration files
- Compile Eaccelerator
- Install Eaccelerator into php.ini
- Restart Apache
- Test to see if everything is ok
wget http://bart.eaccelerator.net/source/0.9.5.2/eaccelerator-0.9.5.2.zip
unzip eaccelerator-0.9.5.2.zip
cd eaccelerator-0.9.5.2
which php
This should return something like: /usr/local/bin/php
We have to remember the location of php
phpize
./configure –enable-eaccelerator=shared –with-php-config=/usr/local/bin/php-config
make
make install
The “make install” commnand will return the location of the eaccelerator.so extention please note the location. You will need this later.
This can be done as a Zend extension or as a PHP extention.
I personally recommend installing it as a Zend extension.
You will have to first locate php using the locate command
locate php
This will usualy return /usr/local/Zend/etc/php.ini on a server that has Zend optimizer installed.
Now we will edit php.ini and add the Eaccelerator extension.
pico /usr/local/Zend/etc/php.ini
Scroll down to the buttom and add the fallowing before the lines about the zend optimizer (They start with [Zend])
zend_extension=”/eaccelerator_location/eaccelerator.so”
eaccelerator.shm_size=”16″
eaccelerator.cache_dir=”/tmp/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″
If you done everything it’s time to restart Apache
service httpd restart
php -v
If you see something like you are all done.
with eAccelerator v0.9.5.1, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
If you enjoyed this post, make sure you subscribe to my RSS feed!
- September 7th

















Thats a great article, the only one that worked for me, thanks!!!
Wow that was simple.Thanks!!
Don’t forget, if you’re running cPanel, you can easily install eAccelerator by recompiling Apache/PHP.
At the command line, run:
# /scripts/easyapache
By the way, I love the site. Keep the articles coming.