Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i'm a big fan of Ubuntu and eaccelerator, but alas, I have found no good repositories for the binaries. Sadly eaccelerator needs to be compiled after every php update on Ubuntu, and even on Lucid they are frequent.

It's not a big job:

cd /home/user/src/eaccelerator-0.9.6 \
   && ./configure --enable-eaccelerator \
   && make clean \
   && make test \
   && sudo make install

Anyone know if there is any way to automize this to run on every php update?

share|improve this question
up vote 4 down vote accepted

Create file with php version:

# dpkg-query -W php5 > /var/cache/php_version

Create script(update eaccelerator if php update) and chmod +x it:


if [ "`dpkg-query -W php5`" != "`cat /var/cache/php_version`" ];
        cd /home/user/src/eaccelerator-0.9.6 \
                && ./configure --enable-eaccelerator \
                && make clean \
                && make test \
                && sudo make install

        dpkg-query -W php5 > /var/cache/php_version;

Add script to apt conf(/etc/apt/apt.conf.d/20eaccelerator):

DPkg::Post-Invoke { '/usr/local/sbin/eaccelerator_update';};

I'm a big fan of Debian/Ubuntu too.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.