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
litespeed_wiki:cpanel:auto-installer [2014/08/05 21:25]
Michael Armstrong
litespeed_wiki:cpanel:auto-installer [2019/01/28 17:03] (current)
Lisa Clarke Copyediting
Line 1: Line 1:
-====== Auto-Installer (for cPanel/​WHM ​installations) ======+====== Auto-Installer (for cPanel/​WHM ​Installations) ====== 
 +===== Alternative Method: get.litespeed.sh ===== 
 +LiteSpeed'​s auto-installer used to be the preferred way to install LSWS on cPanel. However, **we have introduced a better way**. Now you can install LSWS on cPanel through ''​get.litespeed.sh''​ for quick/​automatic installation. Use an optional ''​lsws.options''​ file to predefine your desired settings. ​
  
 +  bash <( curl https://​get.litespeed.sh ) your_serial_no
 +
 +For more information about how this works, please see [[https://​docs.litespeedtech.com/​LSWS/​cpanel/​|the full documentation]]. ​
 +
 +If you still prefer to use the auto-installer,​ continue reading.
 +
 +===== Introduction =====
 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. 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. 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 ​setup.
  
 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.
  
 +Please uninstall any Varnish/​nginx proxies that are in use in front of cPanel Apache before installing LSWS. Such proxies include Engintron, cPnginx, Cachewall(xVarnish) etc.
 ===== Prerequisites ===== ===== Prerequisites =====
  
Line 17: Line 27:
 ===== 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 [[https://​www.litespeedtech.com/​products/​litespeed-web-server/​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 https://​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 ====+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 [[litespeed_wiki:​cpanel:​auto-installer#​examples|here]].
  
-  ./​lsws_whm_autoinstaller.sh SERIAL_NO PHP_SUEXEC port_offset admin_user admin_pass admin_email easyapache_integration auto_switch_to_lsws+  ./​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 1 0+  ​* **(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 ''​2''​ (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 username for accessing the LiteSpeed WebAdmin Console. Default value is ''​admin''​. 
 +  * **(Optional) admin_pass:​** Admin password for accessing the LiteSpeed WebAdmin Console. Default value is ''​a1234567''​. 
 +  * **(Optional) admin_email:​** Admin 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 EasyApache 3 only and is no longer applicable for EasyApache 4 as there is no need to "build a matching PHP" on EA4. For EasyApache 4, use the EA4 PHP rpms instead. Both ''​0''​ and ''​1''​ are 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 ''​1''​ (enable) and ''​0''​ (disable). Default value is ''​1''​. 
 +  * **(Optional) auto_switch_to_lsws:​** Automatically switch to LiteSpeed Web Server at the end of the 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 ====+=== Examples ​===
  
-All optional parameters have default values for convenience,​ but, for security reasons, we strongly recommend that you use your own values for all parameters. +The following commands is with trial only and will use all the default settings: 
- +  ./​lsws_whm_autoinstaller.sh ​TRIAL 
-  ​- (Required) SERIAL_NO: This will register the server using the serial number specified and retrieve a license keyInputting "TRIAL" will cause trial key to be requested ​and installed. +If you have License ​key and want the default values: 
-  ​- (Optional) PHP_SUEXEC: Available values are 0 (disable), 1 (enable), 2 (user home directory only)Default is 2+  ./​lsws_whm_autoinstaller.sh SERIAL-KEY-HERE 
-  - (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. +If you want to set specific paramters ( Replace TRIAL with your serial key if you have one ): 
-  - (Optional) admin_userAdmin user name for accessing the LiteSpeed WebAdmin console. Default is "​admin"​. +  ./​lsws_whm_autoinstaller.sh TRIAL 2 0 admin 123456 ​root@localhost ​1 1 
-  ​- (Optional) admin_pass: Admin user password for accessing the LiteSpeed WebAdmin consoleDefault is "​a1234567"​ +If you just want to specify username ​and password ​Replace TRIAL with your serial key if you have one ): 
-  - (Optional) admin_email:​ Admin user's emailThis email address will receive important server notices, such as license expiring or server core dumps. Default is "root@localhost" +  ./​lsws_whm_autoinstaller.sh TRIAL 2 smith testpw
-  - (Optional) disable_easyapache_integration:​ EasyApache Integration automatically rebuilds matching PHP for LiteSpeed when you update EasyApache. Available values are 1 (enable) ​and (disable). EasyApache Integration is enabled by default. +
-  ​- (Optional) auto_switch_to_lsws:​ Automatically switch to LiteSpeed Web Server at the end of installationThis setting will only take effect if the port offset is set to 0Available values are 1 (enable) ​(disable). Most users will need to test and verify before they switch, so the default is 0 (disabled).+
  
  
 === Notes === === Notes ===
  
-  * 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.+  * 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 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 ==== 
  
-If you did not set the Auto-Installer to automatically switch to LSWS (auto_switch_to_lsws=1),​ the Auto-Installer will not start LSWS 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''​ set to ''​0''​ and ''​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: 
 + 
 +=== If you set port_offset ​to > 0 ===
  
   - Start LSWS using the Restart LiteSpeed button.   - Start LSWS using the Restart LiteSpeed button.
-  - 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.) +  - You can now test your sites on the port you've set LiteSpeed to. (For example, if your port offset is ''​1000'' ​and Apache is on port 80, then LSWS will serve on port 1080.) 
-  - 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 === 
 + 
 +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 ===== 
 +Switching between LiteSpeed and Apache should be done through the LiteSpeed WHM 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     
 +   
 +===== Enable web server service monitoring =====
  
-=== If you set port offset to 0 ===+cPanel can monitor the Apache/​LiteSpeed service and restart it when needed.
  
-LiteSpeed ​Web Server ​is all ready to be your main web serverClicking on the Switch to LiteSpeed ​button will stop Apache ​and start LSWS as your main web server.+Go to the cPanel Service Manager and make sure the ''​Enabled''​ and ''​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.
  
 +{{ :​litespeed_wiki:​cpanel:​cpanel-apache-service-monitoring.png?​600 |}}
 ===== Troubleshooting ===== ===== Troubleshooting =====
  
-For common errors, see our [[litespeed_wiki:​cpanel_troubleshooting|cPanel troubleshooting guide]].+For solutions to common errors, see our [[litespeed_wiki:​cpanel:​troubleshooting|cPanel troubleshooting guide]].
  • Admin
  • Last modified: 2014/08/05 21:25
  • by Michael Armstrong