View Single Post
  #1  
Old 04-19-2006, 12:51 PM
Justin Justin is offline
New Member
 
Join Date: Apr 2006
Posts: 4
Default 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
Code:
$ sudo port install wget
- Download and install Litespeed
Code:
$ tar xzf lsws-2.1.14-std-ppc-osx.tar.gz
$ cd lsws-2.1.14
$ sudo ./install.sh
- Answers to relevant install-time questions
Code:
Destination [/opt/lsws]: /usr/local/litespeed
User [nobody]: www
Group [nobody]: www
HTTP port [8088]: 80
Admin HTTP port [7080]: 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
After installation was complete, I was able to test the built-in PHP module via:

http://localhost/phpinfo.php

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...

http://www.litespeedtech.com/package...ppc-osx.tar.gz

...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.

Code:
http://www.litespeedtech.com/packages/eaccelerator/eaccelerator-php-4.4.2-ppc-osx.tar.gz
           => `eaccelerator-php-4.4.2-ppc-osx.tar.gz'
Resolving www.litespeedtech.com... 69.56.199.218
Connecting to www.litespeedtech.com|69.56.199.218|: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 
           http://www.litespeedtech.com/download.html 
       or build binary from source code.
       Please make a symbolic link from eaccelerator.so.4.4.2 to
       /usr/local/litespeed/lib/eaccelerator.so.
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).

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.
Code:
$ 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
$ make
$ 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
Any suggestions as to how I can eAccelerator installed and working with Litespeed and the PHP LSAPI module?

Thank you!

Justin
Reply With Quote