Our auto-installer allows you to install LiteSpeed Web Server for use with cPanel/WHM with just one script. The auto-installation script installs LSWS and our WHM Plugin, registers your license (or requests a trial license), and builds PHP with LSAPI to match the current EasyApache-built PHP. This leaves you with a ready-to-use LSWS installation.
The auto-installer should benefit two distinct groups of LSWS users.
This wiki will guide you through the parameters available with the auto-installer and how to switch to LSWS after it has been installed using the auto-installer.
The auto-installer script can be downloaded from the control panel plugins download page or with the following commands:
wget http://www.litespeedtech.com/packages/cpanel/lsws_whm_autoinstaller.sh chmod a+x lsws_whm_autoinstaller.sh
The following command is just to explain all the parameters that can be set during the installation process. If you would like a list of example commands please click here.
./lsws_whm_autoinstaller.sh SERIAL_NO [PHP_SUEXEC] [port_offset] [admin_user] [admin_pass] [admin_email] [easyapache_integration] [auto_switch_to_lsws]
Where all optional parameters have default values for convenience, but, for security reasons, we strongly recommend using your own values for all parameters. These parameters can be set as follows:
TRIALwill cause a trial key to be requested and installed.
2(user home directory only). Default value is
1000, Apache will continue running on port 80 and LiteSpeed will run on port 1080. If
port_offsetis set to
0, LiteSpeed will be installed and set to use the same port Apache is currently using, but will not be automatically started after installation unless set to do so in a later parameter. When you are ready to replace Apache with LSWS as your main web server, simply stop Apache and start LiteSpeed (or use the Switch to LiteSpeed button in the WHM plugin). Default value is
1are valid values for EasyApache 4 LSWS installations. For EasyApache 3, easyapache_integration automatically rebuilds matching a PHP for LiteSpeed when you update EasyApache. Available values are
0(disable). Default value is
0. Available values are
0(disable). Most users will need to test and verify before they switch, so the default value is
The following commands is with trial only and will use all the default settings:
If you have a License key and want the default values:
If you want to set specific paramters ( Replace TRIAL with your serial key if you have one ):
./lsws_whm_autoinstaller.sh TRIAL 2 0 admin 123456 root@localhost 1 1
If you just want to specify username and password ( Replace TRIAL with your serial key if you have one ):
./lsws_whm_autoinstaller.sh TRIAL 2 0 smith testpw
Change Licensebutton in the WHM plugin.
If you did not set the Auto-Installer to automatically switch to LSWS (
port_offset set to
auto_switch_to_lsws set to
1), the Auto-Installer will not start LSWS or switch out Apache. To switch to LiteSpeed, open our WHM LiteSpeed Web Server plugin and follow the steps below:
1000and Apache is on port 80, then LSWS will serve on port 1080.)
Switch to LiteSpeedbutton.
LiteSpeed Web Server is ready and waiting to be your main web server. Clicking the
Switch to LiteSpeed button will stop Apache and start LSWS as your main web server.
Switching between LiteSpeed and Apache should be done through the LiteSpeed plugin instead of
service httpd start or
service lsws start from the command line. The plugin will run a series of commands while switching which are far beyond the
service start/stop commands.
You can also do so by running the switching script from the command line:
/usr/local/lsws/admin/misc/cp_switch_ws.sh apache /usr/local/lsws/admin/misc/cp_switch_ws.sh lsws
cPanel can monitor the Apache/LiteSpeed service and restart it when needed.
Go to the cPanel Service Manager and make sure the
Monitor boxes are ticked for
Apache Web Server. cPanel will also monitor the LiteSpeed Web Server process even though it says
Apache. This configuration is to ensure your web server restarts when it is accidentally stopped.
For solutions to common errors, see our cPanel troubleshooting guide.