EAccelerator is a free open-source PHP accelarator, 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. eAccelarator typically reduces server load and increases the speed of your PHP code by 1- 10 times.
To install follow the steps
1. Download and extract the source for eAccelerator.
# cd /usr/local/src/
# wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2
# tar jxvf eaccelerator-0.9.5.3.tar.bz2
2. Build, configure and install the XCache module.
# cd eaccelerator-*
# export PHP_PREFIX=”/usr”
# ./configure –enable-eaccelerator=shared –with-php-config=$PHP_PREFIX/bin/php-config
# make && make install
You can see a message like this . Note the extension directory.
Don’t forget to run ‘make test’.
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
3. Now configure the php.ini file ( To find .ini file, use the command `php -i | grep php.ini` )
# cat eaccelerator.ini >> /usr/local/Zend/etc/php.ini
Replace the following line in php.ini with correct path ,which describes the Installed shared extensions that we noted above.
It will become like this,
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so
4. Restart apache and confirm the eAccelerator installation.
# /etc/init.d/httpd restart
# php -v