Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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:

#!/bin/bash

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;
fi

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
add comment

Your Answer

 
discard

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.