This is an old revision of the document!


How to Install LiteSpeed Web Server from the Command Line

Scope: Standard Edition and Enterprise Edition.

Audience: Those familiar with the Unix/Linux console command line environment and see the GUI as a distraction and overhead.

Run the following commands from ssh as root

cd /root
wget http://www.litespeedtech.com/packages/4.0/lsws-4.2.12-ent-x86_64-linux.tar.gz

Note: Replace the values in this section of the URL to control for your OS and which version you wish to download; lsws-4.2.12-ent-x86_64-linux lsws-4.2.12-ent-x86_64-linux = LSWS Enterprise 4.2.12 for 64bit Linux lsws-4.2.10-std-i386-linux = LSWS Standard 4.2.10 for 32bit Linux lsws-4.2.12-ent-x86_64-freebsd6 = LSWS Enterprise 4.2.12 for 64bit FreeBSD 6.x

Note: On some systems (FreeBSD), fetch can be used.

Unpack the tarball and install

tar zxf  lsws-4.2.2-std-i386-linux.tar.gz
cd lsws-4.2.2
./install.sh

If you set Port Offset to “0”, it may stop Apache and start LiteSpeed after a successful installation, you may want to switch back to Apache temporarily as we still need to build PHP binary for LiteSpeed.

There is a pre-built PHP 4 binary coming with LSWS, however, you should build your own PHP binary using matching configuration options used by Apache mod_php.

If LiteSpeed is running, you should switch back to Apache temporarily by clicking “switch to Apache” link. Then, click “Build Matching PHP binary” link. It is going take a while.

NOTE:If you see below error message when Build Matching PHP, try increase “Max cPanel process memory (minimum: 256)” in cPanel (Main » Server Configuration » Tweak Settings) to at lease 512MB.

Found Errors

ERROR: /usr/local/bin/php -i returns 134 

You can try to build matching PHP from command line: 
"/usr/local/cpanel/whostmgr/cgi/lsws/cmd_buildmatchingphp.sh"

Just click “Restart LiteSpeed” Then you can verify if everything works as expected. It should! 8-)

If “Port Offset” is set to non-zero, you can now replace Apache with LiteSpeed Web Server. Just click “Switch to LiteSpeed”.

That's it.

WARNING: Do NOT uncheck “httpd” service under WHM service manager, otherwise WHM wont restart LiteSpeed automatically when configuration has been changed.

  • Admin
  • Last modified: 2014/06/27 18:43
  • by Michael Armstrong