Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
litespeed_wiki:cpanel:auto-installer [2014/04/25 13:12]
Kevin Fwu Note for CageFS
litespeed_wiki:cpanel:auto-installer [2016/08/10 15:55]
Jackson Zhang [Installation]
Line 5: Line 5:
 The auto-installer should benefit two distinct groups of LSWS users. The auto-installer should benefit two distinct groups of LSWS users.
   - **End users who use cPanel/​WHM:​** Use the script to add LSWS to your cPanel setup quickly and easily.   - **End users who use cPanel/​WHM:​** Use the script to add LSWS to your cPanel setup quickly and easily.
-  - **VPS providers:​** ​Put this script in your server provisioning automation script to further automate server set up.+  - **VPS providers:​** ​Include ​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. 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.
Line 17: Line 17:
 ===== Download ===== ===== Download =====
  
-The auto-installer script can be downloaded ​from from the [[http://​www.litespeedtech.com/​products/​control-panel-plugins/​download|control panel plugins download ​page]].+The auto-installer script can be downloaded from the [[http://​www.litespeedtech.com/​products/​control-panel-plugins/​download|control panel plugins download]] ​page or with the following commands:
  
   wget http://​www.litespeedtech.com/​packages/​cpanel/​lsws_whm_autoinstaller.sh   wget http://​www.litespeedtech.com/​packages/​cpanel/​lsws_whm_autoinstaller.sh
   chmod a+x lsws_whm_autoinstaller.sh   chmod a+x lsws_whm_autoinstaller.sh
-===== Usage =====+===== Installation ​=====
  
-==== The Command ====+Run the auto-installer script using the following command syntax:
  
-  ./​lsws_whm_autoinstaller.sh SERIAL_NO PHP_SUEXEC port_offset admin_user admin_pass admin_email+  ./​lsws_whm_autoinstaller.sh SERIAL_NO PHP_SUEXEC port_offset admin_user admin_pass admin_email ​easyapache_integration auto_switch_to_lsws
  
-Sample input:+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:
  
-  ./​lsws_whm_autoinstaller.sh ​TRIAL 2 1000 admin a1234567 root@localhost+  ​* **(Required) SERIAL_NO:​** This will register the server using the serial number specified and retrieve a license keyInputting "TRIAL" will cause a trial key to be requested and installed. 
 +  * **(Optional) PHP_SUEXEC:​** Available values are 0 (disable), 1 (enable), and (user home directory only). Default value is 2. 
 +  * **(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 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 1000. 
 +  * **(Optional) admin_user:​** Admin user name for accessing the LiteSpeed WebAdmin Console. Default value is "admin". 
 +  * **(Optional) admin_pass:​** Admin user password for accessing the LiteSpeed WebAdmin Console. Default value is "a1234567". 
 +  * **(Optional) admin_email:​** Admin user's email. This email address will receive important server notices, such as license expiration and server core dumps. Default value is "root@localhost". 
 +  * **(Optional) easyapache_integration:​** ​ EasyApache Integration,​ which is applied to easy Apache 3 only and not applicable for Easy Apache 4 any more since there is no need to "build matching PHP" on EA4, instead, using EA4 PHP rpms. For Easy Apache 4, either "0 or "​1"​ value is good for LSWS installation . For Easy Apache 3, easyapache_integration automatically rebuilds matching PHP for LiteSpeed when you update EasyApache. Available values are 1 (enable) and 0 (disable). Default value is 1.  
 +  * **(Optional) auto_switch_to_lsws:​** Automatically switch to LiteSpeed Web Server at the end of installation. This setting will only take effect if the port offset is set to 0. Available values are 1 (enable) and 0 (disable). Most users will need to test and verify before they switch, so the default value is 0 (disabled).
  
-==== Parameters ====+Sample input:
  
-All optional parameters have default values for convenience,​ but, for security reasons, we strongly recommend that you use your own values for all parameters.+  ​./​lsws_whm_autoinstaller.sh TRIAL 2 1000 admin a1234567 root@localhost 1 0
  
-  - (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. 
-  - (Optional) PHP_SUEXEC: Available values are 0 (disable), 1 (enable), 2 (user home directory only). Default is 2. 
-  - (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. 
-  - (Optional) admin_user: Admin user name for accessing the LiteSpeed WebAdmin console. Default is "​admin"​. 
-  - (Optional) admin_pass: Admin user password for accessing the LiteSpeed WebAdmin console. Default is "​a1234567"​ 
-  - (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 === === Notes ===
  
-  * The auto-installer does not start up LiteSpeed Web Server. Once installed, it can be started from the WHM plugin. +  * If you install LSWS with a trial license, you can always switch to purchased license using the "Change License" ​button in 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.+
   * The auto-installer will build PHP for LSWS (with LSAPI) based on your most recent EasyApache PHP build.   * The auto-installer will build PHP for LSWS (with LSAPI) based on your most recent EasyApache PHP build.
   * If CageFS was installed prior to using this script, the auto-installer will automatically add a mount point for LSWS.   * If CageFS was installed prior to using this script, the auto-installer will automatically add a mount point for LSWS.
-==== 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 ===+===== Switching to LiteSpeed after Installation ===== 
 + 
 +If you did not set the Auto-Installer to automatically switch to LSWS (port_offset=0 & auto_switch_to_lsws=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: 
 + 
 +=== If you set port_offset ​to > 0 ===
  
   - Start LSWS using the Restart LiteSpeed button.   - Start LSWS using the Restart LiteSpeed button.
Line 59: Line 60:
   - When you're ready to switch to LiteSpeed as your main web server, just use the Switch to LiteSpeed button.   - 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 ===+=== 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.+LiteSpeed Web Server is ready and waiting ​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 ===+===== Switching between LiteSpeed and Apache ===== 
 +Switching between LiteSpeed and apache should be done through LiteSpeed plug in instead of "​service httpd start" or "​service lsws start" from command line. Plug in will run a series of commands during the switching, which are far beyond "​service start/​stop"​ commands.  
 + 
 +You can also do so by running switching script from command line: 
 + 
 +  /​usr/​local/​lsws/​admin/​misc/​cp_switch_ws.sh apache 
 +  /​usr/​local/​lsws/​admin/​misc/​cp_switch_ws.sh lsws     
 +===== Enable web server service monitoring ===== 
 + 
 +cPanel can monitor Apache/​LiteSpeed service and restart it when needed. 
 + 
 +Go to cPanel Service Manager and make sure "​Enabled"​ and "​Monitor"​ boxes are ticked for "​Apache Web Server"​. cPanel will monitor LiteSpeed web server process as well, though it says "​Apache"​. This configuration is to ensure web server restart when it is accidentally stopped. 
 + 
 +===== Troubleshooting =====
  
-  * 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.+For common errors, see our [[litespeed_wiki:​cpanel:​troubleshooting|cPanel troubleshooting guide]].
  • Admin
  • Last modified: 2019/01/28 17:03
  • by Lisa Clarke