Installing/Configuring LiteSped w/ PHP
What is LiteSpeed?
LiteSpeed Web Server is the leading high-performance, high-scalability web server. It is completely Apache interchangeable so LiteSpeed Web Server can quickly replace a major bottleneck in your existing web delivery platform. With its comprehensive range of features and easy-to-use web administration console, LiteSpeed Web Server can help you conquer the challenges of deploying an effective web serving architecture.
LiteSpeed Web Server has superior performance in terms of both raw speed and scalability. Our benchmarks demonstrate that it is more than 6 times faster than Apache. When serving static content, LiteSpeed surpasses well-respected content accelerators including thttpd, boa and TUX. When it comes to dynamic content, LiteSpeed is more than 50% faster in PHP content delivery than Apache with mod_php. Don’t just take our word for it. Download the LiteSpeed free or trial version and experience it for yourself.
Since its 3.0 release, LiteSpeed Web Server works flawlessly alongside web hosting control panels including cPanel, DirectAdmin, etc. as a drop-in Apache replacement. Easily increase PHP performance and security while doubling server capacity. LiteSpeed is the best choice for shared hosting service providers.
1.0 INSTALLING LITESPEED/PHP
1.1 Installing LiteSpeed with CHRoot
- /usr/sbin/useradd -g HTTPD -s /bin/false LSWS
- mkdir -p /chroot/lsws
- cd /usr/src
- wget http://www.litespeedtech.com/packages/3.0/lsws-3.3.24-ent-i386-linux.tar.gz
- tar -zxvf lsws-3.3.24-ent-i386-linux.tar.gz
- cd lsws-3.3.24
- (DOWNLOAD AND WGET A NEW trial.key)
- ./install.sh
- Do you agree with above license? Yes
- Destination [/opt/lsws]: /chroot/lsws
- Chroot Path /chroot
- User name [admin]: admin
- Password: 123456 (change with your own admin password)
- Retype password: 123456
- User [nobody]: LSWS (use a non-system user that doesn’t have a shell access and home directory)
- Group [nobody]: HTTPD (group the webserver will be running as)
- HTTP port [8088]: 80
- Admin HTTP port [7080]: 7080
Don’t forget, both these ports should be enabled in the firewall - Setup up PHP [Y/n]: Y
- Suffix for PHP script(comma separated list) [php]: php
- Would you like to change PHP opcode cache setting [y/N]? N
- Would you like to install AWStats Add-on module [y/N]? N
- 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]? Y
- Would you like to start it right now [Y/n]? Y
1.2 Installing PHP for LiteSpeed
- wget http://us2.php.net/get/php-5.2.9.tar.gz/from/us.php.net/mirror
- tar -zxvf php-5.2.9.tar.gz
MAIL PATCH- cd /usr/src
- wget http://choon.net/opensource/php/php-5.2.9-mail-header.patch
- cd php-5.2.9
- patch -p1 < ../php-5.2.9-mail-header.patch
SUHOSIN PATCH
- cd /usr/src
- wget http://download.suhosin.org/suhosin-patch-5.2.9-0.9.7.patch.gz
- wget http://download.suhosin.org/suhosin-0.9.27.tgz
- gunzip suhosin-patch-5.2.9-0.9.7.patch.gz
- cd php-5.2.9
- patch -p 1 -i ../suhosin-patch-5.2.9-0.9.7.patch
- phpize
- ./configure
- make
- make install
- cd /usr/src/php-5.2.9/sapi
- wget http://www.litespeedtech.com/packages/lsapi/php-litespeed-4.9.tgz
- tar -zxvf php-litespeed-4.9.tgz
- cd ..
- touch ac*
- ./buildconf –force
– IF ERROR ON ./buildconf:
————————–
install autoconf-2.13
————————–
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz
tar zfvx autoconf-2.13.tar.gz
cd autoconf-2.13
./configure
make
make install
cd ..
./buildconf –force
Depending on your install, you will need to install packages/sources. This list cover most of the common ones needed just so you don’t get error on install.
The most important to make sure you include is –with-litespeed
Compile and Install…
make install
Now that we have PHP done, lets get the new binary moved over:
- cd /opt/lsws/fcgi-bin
- mv lsphp lsphp.old
- cp /usr/src/php-5.2.9/sapi/litespeed/php ./lsphp
- (RESTART LSWS)
2.0 CONFIGURING SERVICES
2.1 Configuring LiteSpeed with CHRoot
Because we are running in a CHRoot Environment now, we need to copy over the needed binaries for PHP.
2.2 Configuring PHP for LSWS CHRoot
Find the following and set the socket location…
…
mysql.default_socket = /tmp/mysqld/mysqld.sock
2.3 Configuring MySQL for LSWS CHRoot
Find and edit MySQL so that it sets the sock in the CHRoot:
socket=/chroot/lsws/tmp/mysqld/mysqld.sock
[mysqld]
socket=/chroot/lsws/tmp/mysqld/mysqld.sock
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
![[Google]]( http://www.warezteacher.com/wp-content/plugins/easy-adsenser/google-light.gif)

May 30th, 2009 at 2:30 PM
great comment.
June 13th, 2009 at 12:50 AM
Hi, interest post. I’ll write you later about few questions!