04-19-2006, 12:51 PM
Join Date: Apr 2006
Litespeed and eAccelerator on Mac OS X
I've installed Litespeed Standard 2.1.14 on a test iBook running Mac OS X 10.4.5 (PPC), and for the most part it appears to function. There are a few gotchas I've come across, which I'll explain below as I document the process.
- Install wget, which is required by the installer but is not on OS X by default
- Download and install Litespeed
$ sudo port install wget
- Answers to relevant install-time questions
$ tar xzf lsws-2.1.14-std-ppc-osx.tar.gz
$ cd lsws-2.1.14
$ sudo ./install.sh
After installation was complete, I was able to test the built-in PHP module via:
Destination [/opt/lsws]: /usr/local/litespeed
User [nobody]: www
Group [nobody]: www
HTTP port : 80
Admin HTTP port : 9007
Setup up PHP [Y/n]: Y
Suffix for PHP script(comma separated list) [php]:
Would you like to change PHP opcode cache setting [y/N]? N
Would you like to install AWStats Add-on module [y/N]? Y
Would you like to import Apache configuration [y/N]? N
Would you like to have LiteSpeed Web Server started automatically when the machine restarts [Y/n]? N
Would you like to start it right now [Y/n]? Y
I did some benchmark testing via Apache Bench on the above URL but was only able to get about 68 requests per second. I used the enable_phpa.sh command line tool to turn the APC cache tool on and off, but it did not appear to make a difference.
I decided to try some of the other caching tools, but ran into several problems. With mmcache, for example, the download link from the download page...
...results in a 404 "File Not Found" error (just click the above link and you'll see what I mean).
Okay, so much for mmcache. Let's try eAccelerator. I run enable_phpa.sh and select item #3 (eAccelerator), and the following is the output.
Whoa. eAccelerator is at version 4.4.2? No, it's currently at 0.9.4. It looks like some copying-and-pasting went on when the enable_phpa.sh script was written, and all that was changed for eAccelerator was the name (thus it having the same version number as mmcache).
Resolving www.litespeedtech.com... 220.127.116.11
Connecting to www.litespeedtech.com|18.104.22.168|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
12:34:12 ERROR 404: Not Found.
[WARN] Can not retrieve binary package for eaccelerator from www.litespeedtech.com,
please download it manually from
or build binary from source code.
Please make a symbolic link from eaccelerator.so.4.4.2 to
I tried compiling eAccelerator manually via the following steps and then selecting it via enable_phpa.sh, but doing so broke PHP completely, and I had to revert to APC.
Any suggestions as to how I can eAccelerator installed and working with Litespeed and the PHP LSAPI module?
$ tar xzf eaccelerator-0.9.4.tar.bz2
$ cd eaccelerator-0.9.4
$ sudo /usr/bin/phpize
$ ./configure --enable-accelerator=shared --with-php-config=/usr/bin/php-config --with-eaccelerator-userid=www
$ sudo make install
$ sudo cp /usr/lib/php/extensions/no-debug-non-zts-20020429/eaccelerator.so /usr/local/litespeed/lib/
$ cd admin/misc
$ sudo ./enable_phpa.sh