This is an old revision of the document!


How to convert your cPanel server to LiteSpeed in 20 minutes

This only works with LiteSpeed Enterprise Edition, you need a trial key or an Enterprise License serial number.

Run the following commands from ssh as root

cd /usr/src; curl http://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.sh | sh

Note: To uninstall WHM LiteSpeed plugin, run the following command:

/usr/local/cpanel/whostmgr/docroot/cgi/lsws/lsws_whm_plugin_uninstall.sh
  1. Click the “LiteSpeed Web Server” plugin. (In the “Plugins” section at the bottom of the scroll menu)
  2. Click “Install LiteSpeed Web Server”
  3. Fill in the form to sepecify
    • Trial license key or serial number
    • LiteSpeed target installation directory
    • Port Offset (set to 0 to replace Apache otherwise set a number like “2000” for example to try LiteSpeed on port 2080)
    • Whether to enable PHP SuEXEC
    • Your Administrators email address.
    • Username and password for LWSW WebAdmin Console
  4. Click “Next” to install LiteSpeed

LSWS comes with a pre-built PHP 4 binary. However, you should build your own PHP binary using configuration options matching those used by Apache mod_php.

Then, click “Build Matching LSPHP”. This step will take a while.

NOTE:If you see one of the below error messages when running “Build Matching LSPHP”, try increasing “Max cPanel process memory (minimum: 512)” in the side menu under Server Configuration » Tweak Settings to at least 512MB.

Found Errors

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

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

Or

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"

Click “Restart LiteSpeed”.

You can now verify if everything is working as expected. It should be! 8-)

You can now replace Apache with LiteSpeed Web Server. Click “Change Port Offset” and set the value to 0 if you had not done so previously. Click “Switch to LiteSpeed” and that's it!

WARNING: Do NOT uncheck the “Apache Web Server” (httpd) service under WHM's service manager. If you do this WHM will not restart LiteSpeed automatically when configuration changes have been made.

  • Admin
  • Last modified: 2015/08/14 20:56
  • by Michael Alegre