Mar
02
2007

Installing eAccelerator on Debian

This is a quick HowTo for installing the eAccelerator PHP cache/optimizer on a Debian system (should be applicable to other Linux distros as well).

  1. Download the latest release from SourceForge.net to your server and extract the sources.
  2. Change to the sources directory and type in the following.
    export PHP_PREFIX="/usr"
    $PHP_PREFIX/bin/phpize
    ./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config

    This should set up the environment and compile configuration correctly.
  3. Now compile with make and install with make install (as root) afterwards.
  4. To configure eAccelerator you have to edit your PHP config which resides in /etc/php4/apache2/php.ini on my system.
    Add the following lines at the end: 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"

    The file README in the sources directory gives a pretty good explanation of all those parameters. The only one you should probably alter is the shm.size because 16MB of shared memory might be a little bit too conservative.
  5. Last step is to create the directory where eAccelerator stores the cached scripts which don’t fit into the shared memory. mkdir /tmp/eaccelerator
    chmod 0777 /tmp/eaccelerator

Now you’re done. Further tweaking can be accomplished by altering all the parameters in the php.ini file.

Written by Florian Beer in: linux,server
rel-tag , , , , ,

2 Comments »

  • links from Technorati Lenovo ruft weltweit Notebook-Akkus zurückMicrosoft Threatened With Fines By EU AgainLaptop Power Management in LinuxUna de las cosas que pienso hacer la semana que vieneGrowth of E-Waste May Lead to National ‘E-Fee’Installing eAccelerator on DebianO2Sources recherche un stagiaire en vue d’une embauche

    Pingback | 2. March, 2007
  • links from Technorati  running the latest version so far (1.1.2), I’ve chose it because it’s lightweight and has comments written all over the code, so it’s way much simpler to modify something, then it was in phpBB. So here’s the test: Following this tutorial (yes, I know, I’m a geek because I read linux tutorials) Looking through google on how to untar .tar.bz2 archives.. found the command tar –bzip -xf filename.tar.bz2 and initially it didn’t work. I thought of trying

    Pingback | 27. May, 2007

RSS feed for comments on this post.
TrackBack URL.

Leave a comment