eAccelerator is a further development from mmcache PHP Accelerator & Encoder. It increases performance of PHP scripts by caching them in compiled state, so that the overhead of compiling is almost completely eliminated.
Installing eAcceleration in Debian
First you need to download php4-dev package which we need to compile eAccelerator
#apt-get install php4-dev
Download eAccelerator source package from here to /root folder and extract it
#tar jxvf eaccelerator-0.9.4.tar.bz2
#cd eaccelerator-0.9.4
Running phpize creates config file which is needed in make.
#/usr/bin/phpize
#./configure --enable-eaccelerator=shared --with-php-config=/usr/bin/php-config
#make
#make install
After this installation completed.
Edit file /etc/php4/apache2/php.ini and add following lines:
extension="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"
Create temporary folder to eAccelerator
#mkdir /tmp/eaccelerator
#chmod 0777 /tmp/eaccelerator
Restart apache and you're finished with the eAccelerator configuration
#/etc/init.d/apache2 restart
Testing Your installation
Create test.php file with following lines on it:
If you have eAccelerator info shown on that page, accelerator is working