Wiki
 

Auto-Installer (for cPanel/WHM installations)

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.

  1. End users who use cPanel/WHM: Use the script to add LSWS to your cPanel setup quickly and easily.
  2. VPS providers: Put this script in your server provisioning automation script to further automate server set up.

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.

Prerequisites

  1. This auto-installer can only be used for cPanel/WHM installations.
  2. Make sure beforehand that all sites are working fine with Apache.
  3. PHP must have been built with EasyApache. LiteSpeed will build its matching PHP (with LSAPI) based on this build of PHP.

Download

The auto-installer script can be downloaded from from the control panel plugins download page.

wget http://www.litespeedtech.com/packages/cpanel/lsws_whm_autoinstaller.sh
chmod a+x lsws_whm_autoinstaller.sh

Usage

The Command

./lsws_whm_autoinstaller.sh SERIAL_NO PHP_SUEXEC port_offset admin_user admin_pass admin_email

Sample input:

./lsws_whm_autoinstaller.sh TRIAL 2 1000 admin a1234567 root@localhost

Parameters

All optional parameters have default values for convenience, but, for security reasons, we strongly recommend that you use your own values for all parameters.

  1. (Required) SERIAL_NO: This will register the server using the serial number specified and retrieve a license key. Inputting “TRIAL” will cause a trial key to be requested and installed.
  2. (Optional) PHP_SUEXEC: Available values are 0 (disable), 1 (enable), 2 (user home directory only). Default is 2.
  3. (Optional) port_offset: Controls the Apache port offset. This allows you to run LiteSpeed in parallel with Apache to test it out. For example, if you set port offset to 1000, Apache will continue running on port 80 and LiteSpeed will run on port 1080. If port offset is 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 it is installed. When you are ready to replace Apache with LSWS as the main web server, simply stop Apache and start LiteSpeed (or use the Switch to LiteSpeed button in the WHM plugin). Default is 1000.
  4. (Optional) admin_user: Admin user name for accessing the LiteSpeed WebAdmin console. Default is “admin”.
  5. (Optional) admin_pass: Admin user password for accessing the LiteSpeed WebAdmin console. Default is “a1234567”
  6. (Optional) admin_email: Admin user's email. This email address will receive important server notices, such as license expiring or server core dumps. Default is “root@localhost”

Notes

  • The auto-installer does not start up LiteSpeed Web Server. Once installed, it can be started from the WHM plugin.
  • The auto-installer will not automatically switch LiteSpeed with Apache as your main web server. We wish to give hosts a chance to test sites before switching. Once installed, you can switch to LSWS using the WHM plugin.
  • Some hosts may find it easier to automatically install LSWS with a trial license (since the input will thus always be the same). If you install LSWS with a trial license, you can always switch to your purchased license using the Change License button in the WHM plugin.

Switching to LiteSpeed

The auto-installer installs and registers LSWS, but does not start it or switch out Apache. To switch to LiteSpeed, open our WHM plugin and follow the steps below:

If you set port offset to >0

  1. Start LSWS using the Restart LiteSpeed button.
  2. You can now test your sites on the port you've set LiteSpeed to. (If your port offset is 1000 and Apache is on port 80, then LSWS will serve on port 1080.)
  3. When you're ready to switch to LiteSpeed as your main web server, just use the Switch to LiteSpeed button.

If you set port offset to 0

LiteSpeed Web Server is all ready to be your main web server. Clicking on the Switch to LiteSpeed button, will stop Apache and start LSWS as your main web server.

Notes

  • Enabling EasyApache integration (with the EasyApache Integration button) will automatically rebuild PHP for LiteSpeed every time you rebuild PHP with EasyApache. This will make it easier to upgrade PHP in the future — just build PHP in EasyApache and a matching LSPHP will be auto-built.
 
litespeed_wiki/cpanel/auto-installer.txt · Last modified: 2014/01/28 14:24 by mistwang