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:
- 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 :-)