Running eAccelerator on OpenBSD’s Apache

       121 words, 1 minutes

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:

# pkg_add autoconf-2.63 automake-1.10.3p0 m4 libtool
# 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
# cd eaccelerator-0.9.6.1
# AUTOCONF_VERSION="2.63" phpize
# ./configure --with-eaccelerator-userid=67
# make
# 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
# vi /var/www/conf/php5/eaccelerator.ini
(...)
eaccelerator.log_file = "/logs/eaccelerator_log"
(...)
eaccelerator.shm_only = "256"

Quite simple and fast :-)