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.
Step 1: Install LiteSpeed WHM plugin
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
Step 2: Install LiteSpeed Speed Web Server from within WHM
- Click the “LiteSpeed Web Server” plugin. (In the “Plugins” section at the bottom of the scroll menu)
- Click “Install LiteSpeed Web Server”
- 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
- Click “Next” to install LiteSpeed
If you set Port Offset to “0”, Apache will be stopped and LiteSpeed started after a successful installation. You may want to switch back to Apache temporarily as we still need to build the PHP binary for LiteSpeed.
Step 3: Build matching PHP binary
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"
Step 4: Start LiteSpeed again
Click “Restart LiteSpeed”.
You can now verify if everything is working as expected. It should be!
If “Port Offset” was set to non-zero, you can now replace Apache with LiteSpeed Web Server bu clicking “Switch to LiteSpeed”.
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.