Running eAccelerator on OpenBSD’s Apache

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
    # tar xvjf eaccelerator-
  • Compile eAccelerator:
    # cd eaccelerator-
    # AUTOCONF_VERSION="2.63" phpize
    # ./configure --with-eaccelerator-userid=67
    # make
  • Install the module and its configuration file:
    # cp -p ./modules/ /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 :-)

Installing (eAccelerator) from source:

Author: Joel Carnat

Technical Architect and SysAdmin @work ; OpenBSD and FOSS @home ; Karate, Kobudō, Jōdō, Bodyweight workout, Photography @hobby

One thought on “Running eAccelerator on OpenBSD’s Apache”

Leave a Reply

Your email address will not be published. Required fields are marked *


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