Running eAccelerator on OpenBSD’s Apache

one comment

OpenBSD provides an optimized and secured Apache v1.3 server. It also provides various PHP modules. But it doesn’t provide the eAccelerator PHP module (yet?).

Here’s how I compiled, installed and run eAccelerator on OpenBSD’s native Apache:

  • Prepare the environment for eAccelerator compilation:
    # pkg_add autoconf-2.63 automake-1.10.3p0 m4 libtool
  • Grab and extract eAccelerator:
    # ftp http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2
    # tar xvjf eaccelerator-0.9.6.1.tar.bz2
  • Compile eAccelerator:
    # cd eaccelerator-0.9.6.1
    # AUTOCONF_VERSION="2.63" phpize
    # ./configure --with-eaccelerator-userid=67
    # make
  • Install the module and its configuration file:
    # cp -p ./modules/eaccelerator.so /var/www/lib/php/modules/
    # cp -p ./eaccelerator.ini /var/www/conf/php5.sample/
    # cp -p /var/www/conf/php5.sample/eaccelerator.ini /var/www/conf/php5/eaccelerator.ini
    # mkdir /var/www/tmp/eaccelerator
    # chown www:www /var/www/tmp/eaccelerator
  • Configure eAccelerator:
    # vi /var/www/conf/php5/eaccelerator.ini
    (...)
    eaccelerator.log_file = "/logs/eaccelerator_log"
    (...)
    eaccelerator.shm_only = "256"
  • Restart Apache.

Quite simple and fast :-)

Source:
Installing (eAccelerator) from source: http://eaccelerator.net/wiki/InstallFromSource

One Response to “Running eAccelerator on OpenBSD’s Apache”

  1. Till Kraemer says:

    I had tons of segmentation fault errors with APC, so thanks a lot for this great tutorial!

Leave a Reply

*