msgbartop
MAC OS X, Linux, Windows and other IT Tips and Tricks
msgbarbottom

31 Jul 12 Installing eAccelerator for PHP in Debian Squeeze

This great application really speeds-up the processing and therefore delivery of complex web sites based on PHP, for example from CMS like Typo3.
Here is how to install it.

Credits FROM:
//www.debiantutorials.com/installing-eaccelerator/ and
//github.com/eaccelerator/eaccelerator/wiki/InstallFromSource
Instructions in German:
//www.sysadminslife.com/linux/eaccelerator-php-beschleuniger-installation-unter-debian-5-lenny-und-ubuntu/

Download it
cd /tmp
wget //github.com/downloads/eaccelerator/eaccelerator/eaccelerator-0.9.6.1.tar.bz2

Unpack it
tar -xvjf eaccelerator-0.9.6.1.tar.bz2
Prepare for compiling it
apt-get install php5-dev make
cd eaccelerator-0.9.6.1
phpize

Compile it
Note: The extra option –without-eaccelerator-use-inode is a fix for problems of basedir-open/basedir-restrictions found with this version of eAccelerator.
See //tipstricks.itmatrix.eu/?p=1297 for more details.
./configure --enable-eaccelerator=shared --without-eaccelerator-use-inode
make
make install

Add a configuration to it
Add the following configuration in:
/etc/php5/conf.d/eaccelerator.ini

extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/cache/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 the cache directory for it
mkdir -p /var/cache/eaccelerator
chmod 0777 /var/cache/eaccelerator

Restart Apache2
/etc/init.d/apache2 restart

Reader's Comments

  1.    

    there is a tiny mistake by “Prepare for compiling it”before executing phpize, you have to:cd in eaccelerator-0.9.6.1/eventually also execute apt-get install make if ‘make’ is not installed on your system

    Reply to this comment
  2.    

    Thank you very much, it really works

    Reply to this comment
  3.    

    Thank you very muck! It works.

    Reply to this comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: