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

1. Login as root
2. Download Eaccelerator

wget http://bart.eaccelerator.net/source/...or-0.9.5.2.zip

3. Extract and move into the directory

unzip eaccelerator-0.9.5.2.zip
cd eaccelerator-0.9.5.2

4. Locate where php is

which php

This should return something like: /usr/local/bin/php
We have to remember the location of php
5. Create configuration files

phpize

6. Compile Eaccelerator

./configure –enable-eaccelerator=shared –with-php-config=/usr/local/bin/php-config
make
make install

The "make install" command will return the location of the eaccelerator.so extention please note the location. You will need this later.

1. Install Eaccelerator into php.ini

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″

2. Restart Apache

If you done everything it's time to restart Apache

service httpd restart

3. Test to see if everything is ok

php -v

If you see something like you are all done.

with eAccelerator v0.9.5.1, Copyright (c) 2004-2006 eAccelerator, by eAccelerator