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:installation:command_line [2016/03/21 15:40]
Rob Holda
litespeed_wiki:installation:command_line [2022/02/17 18:35] (current)
Lisa Clarke Long overdue updates and improvements
Line 1: Line 1:
-==== Installation/​Uninstallation ====+====== Installation/​Uninstallation ​======
  
-=== Installation ===+===== Installation ​=====
  
 Installation must be performed in a command line terminal. For testing purposes, LiteSpeed Web Server can be installed into a home directory by a non-privileged user. For production use, it should be installed into a system directory. Installation must be performed in a command line terminal. For testing purposes, LiteSpeed Web Server can be installed into a home directory by a non-privileged user. For production use, it should be installed into a system directory.
  
-In Mac OS X, root user is disabled by default. It can be enabled using a series of actions detailed on the [[http://​support.apple.com/​kb/​PH11331|Apple]] website. ​You can also use the sudo command to install LSWS into a system directory without enabling the root user, but system folders will still only be manipulable by the root user. This means that every time you want to control LSWS from the command line terminal (like when you want to start or stop LSWS), you will have to use the sudo command.+You can also use the sudo command to install LSWS into a system directory without enabling the root user, but system folders will still only be manipulable by the root user. This means that every time you want to control LSWS from the command line terminal (like when you want to start or stop LSWS), you will have to use the sudo command.
  
-== Installation Steps: ​==+==== Decompress ====
  
-  - Decompress the package into a convenient location:\\ ''​tar xvfz lsws-xxxx.tar.gz''​ or ''​gunzip -c lsws-xxxx.tar.gz | tar xvf -''​ +Decompress the package into a convenient location:
-  - **[Enterprise Edition Only]** Install trial license key or serial number: +
-    * Trial License: +
-      - A trial license is for evaluation purposes and is only good for 15 days after download. A trial license can be requested from download page. +
-      - A trial license key will be sent to you as an attachment in a confirmation email. Please save the attachment as ''​trial.key''​ and copy it to the installation directory. +
-      - When you switch from a trial license to a production license, you can simply run the install script again after following the steps below to update your license. +
-    * Production license: +
-      - Licenses can be leased or purchased at the LiteSpeed [[http://​store.litespeedtech.com|store]]. +
-      - A serial number will be sent to you in the confirmation email after you order has been successfully processed. Each serial number allows for one server installation. +
-      - Save the serial number as "​serial.no";​ in the installation directory (where install.sh is located). ​ The LiteSpeed products registration server will use this file to retrieve your license key during the installation process. +
-  - Go to the installation directory ''​cd lsws-xxxx''​ and run command ''​./​install.sh''​ This will start LiteSpeed'​s Installer.\\ \\ Note that only by running this command as the "​root"​ user can you install the server into a system directory. Other users should install it to somewhere under their home directory.\\ \\ Mac OS X users can install the server into a system directory with command ''​sudo ./​install.sh''​ +
-  - Read the End User License Agreement and type "​Yes"​ to confirm your agreement. +
-  - Specify the directory where you would like to install LiteSpeed Web Server. For the root user, the default is /​usr/​local/​lsws. For non-privileged users, the default is their home directory. Remember, non-privileged users will not be able to install the server into a system directory.  +
-  - **[Enterprise Edition Only] Generate license request.**\\ \\ If the Installer only finds serial number but no valid license key, it will prompt to generate a license request. The installer will talk to LiteSpeed products registration server and obtain a valid license key automatically. Upon getting the license key, it will go to next step. If failed, the installer will exit and leave a license request file.\\ \\ If the automatic process failed, you can create a ticket with license department from online store client area.\\ \\ Note: Installation will continue only if there is a valid trial license or valid Enterprise license. +
-  - Follow the instructions on the screen. The Installer will ask you to set the following:  +
-    - If previously installed copy exists, the Installer will ask you to choose either upgrade, reinstall, or change directory. Upgrading will keep your current configurations. +
-    - Administrator'​s username and password for the WebAdmin interface. +
-    - What control panel, if any, you will use with LSWS. +
-    - User and group that the server process will run on behalf of. +
-    - TCP port for normal web service. +
-    - TCP port for WebAdmin interface. +
-    - Whether to set up LiteSpeed PHP. +
-    - **[Enterprise Edition Only]** Root user has the option to enable chroot. The installer will setup the initial chroot environment automatically. Chroot is an advanced feature and your CGI may fail without configuration tuning. We strongly recommend not enabling chroot unless you are familiar with it. You can always enable it later by performing an upgrade installation. +
-  * Finally, the Installer will ask you if you want to install the AWStats add-on module to keep track of your web statistics. Root user can also choose to run LiteSpeed web server automatically at system startup as a service. Then you're done! The installer can start up the server.+
  
-== Testing Installation == +<code
-  - For detailed information on controlling the server processes, please see the [[http://​www.litespeedtech.com/​docs/​webserver/​admin|Administration Guide]]. To start the server, simply run ''​[your_install_dir]/​bin/​lswsctrl start''​. +tar xvfz lsws-xxxx.tar.gz
-  - To access your site, point your browser to **<nowiki>http://​[address]:​8088/</​nowiki>​**,​ [address] being the IP address or domain name of your web server machine. Use "​localhost"​ if the server is on the machine you are using. "​8088"​ is the default port. If you changed the port during installation,​ write the port you designated. A congratulations page should load into the browser. If not, try the WebAdmin interface. +
-  The default port for the WebAdmin interface is 7080Plug **<​nowiki>​http://​[address]:​7080/</​nowiki>​**,​ into your browser to go to the WebAdmin interface. (If you changed the port for WebAdmin during installation,​ use that port instead.) Remember that for [address] you can use "​localhost"​ if you're using the machine the server is on. The administration interface welcome page should load. Click the "Log on" link and use the administrator'​s username and password specified during installation to log on. For detailed information regarding configuration,​ please refer to our [[http://​www.litespeedtech.com/​docs/​webserver/​config|Configuration Guide]], or click the "​help"​ link on top of each page. +
-  - If your server uses firewall, please make sure that localhost is trusted. For instance, Linux with IPTables should include a rule ''​ALLOW INPUT from LO''​. +
-  - If your web site and the WebAdmin interface are inaccessible,​ please take a look at the error log - ''​[your_install_dir]/​logs/​error.log''​ +
-    * If there is a TCP port conflict with other server applications,​ the web server should be reinstalled with an available port.\\ The following command can be used to find an available port: \\ ''​netstat -an | grep XXXX''​\\ XXXX is a port number. If the port is available, the command will produce no output. +
-    * If the swapping directory is not writable, you can either grant writing permission for the swapping directory to the user whom the web server is running as, or change the swapping directory manually. The swapping directory is configured in the server'​s XML configuration file located at ''​[your_install_dir]/​conf/​httpd_config.xml'',​ default value is ''/​tmp/​lshttpd/​swap''​. Search for ''<​swappingDir>''​.+
  
-If you still have problems with installation,​ please check out our  +</​code>​ 
-[[http://​www.litespeedtech.com/​support/​wiki|wiki]] ​or post your problem  +or
-on our support [[http://​www.litespeedtech.com/​support/​forum/​|forum]].+
  
-=== Upgrading ===+<​code>​ 
 +gunzip -c lsws-xxxx.tar.gz | tar xvf -
  
-There are a few scenarios where you would need to update or upgrade the server:+</​code>​ 
 +**Note:** Replace ''​%%xxxx%%''​ in the above filenames with the correct values. It will vary based on the version of LSWS you are installing.
  
-  * A new release is available +==== Install Trial License Key or Serial Number ====
-  * Upgrade from Standard Edition to Enterprise Edition +
-  * Upgrade from a trial license to production license +
-  * Upgrade/​downgrade to a different production license+
  
-There are a number of ways to upgrade. One way is to just run install.sh again and select  +=== Trial License ===
-"​Upgrade"​ when prompted. Your current configurations will be kept.+
  
-Starting with release 2.0, version management ​can also be done from the WebAdmin interface, ​ +  - A trial license is for evaluation purposes and is only good for 15 days after downloadA trial license ​can be requested ​from [[https://​www.litespeedtech.com/​products/​litespeed-web-server/​download/​get-a-trial-license|the LiteSpeed website]]. 
-under Actions ​Version ManagementAll your installed versions ​and the available new releases  +  A trial license key will be sent to you as an attachment in a confirmation emailPlease save the attachment as ''​%%trial.key%%'' ​and copy it to the installation directory. 
-are listed hereYou can install ​a new release or switch between different versions by  +  - When you switch from a trial license to a production license, you can simply run the install ​script again after following ​the steps below to update ​your license.
-clicking ​the appropriate link. Since release 2.0, LSWS also features a built-in ​update ​agent  +
-that will check for new releases periodically and send email notifications.+
  
-Starting with release 4.1, you can upgrade to the latest release, force reinstall, or downgrade to an old version using the command line tool lsup.sh. See detailed usage information in ''​[your_install_dir]/​admin/​misc/​lsup.sh --help''​+=== Production License ===
  
-Since release 1.5.6, multiple versions of LiteSpeed Web Server ​can be installed. You can easily switch from one to another by using the version management utility:\\ ''​[your_install_dir]/admin/misc/​mgr_ver.sh''​.  +  - Licenses ​can be leased or purchased in [[https://store.litespeedtech.com|the LiteSpeed store]]
-  ​* To switch ​to a version already installed, ​for example 1.5.6, just run ''​[your_install_dir_current_version]/​admin/​misc/​mgr_ver.sh   1.5.6''​ +  ​- A serial number will be sent to you in the confirmation email after your order has been successfully processed. Each serial number allows ​for one server installation. 
-  * To remove previously installed files for a certain version, for example 1.5.6, just run ''​[your_install_dir_current_version]/​admin/​misc/​mgr_ver.sh -d 1.5.6''​+  - Save the serial number as ''​%%serial.no%%'' ​in the installation directory (where ​''​%%install.sh%%''​ is located)The LiteSpeed products registration server will use this file to retrieve your license key during the installation process.
  
-When upgrading your license (from trial to production license, for example), you can manually  +==== Begin Installation ====
-copy "​serial.no"​ to the ''​[your_install_dir]/​conf/''​ directory, then restart. Please backup your old serial number and license key before restart.+
  
-=== License transfer procedure===+Run the following commands to go to the installation directory and start LiteSpeed'​s Installer (remember to replace ''​%%xxxx%%''​ with the correct value):
  
-Please be aware that each license key is associated with a serial number ​ +<​code>​ 
-and the server'​s hardware signature. A new key is required if a change ​ +cd lsws-xxxx 
-in hardware signature is detectedSo if you upgrade or change your hardware,  +./install.sh
-you need to transfer your current production license in order to continue using the product+
  
-  - To migrate your current license, you can simply run the server binary ''​./lshttpd -m''​. It will talk to LiteSpeed'​s products registration server, unlock your serial number, and generate a temporary license key. This temporary key is good for 3 days. This allows you a smooth transition to the new server. +</code> 
-  - If you wish, you can take this chance to download the latest version of LiteSpeed Web Server to your new hardware. Then copy the serial number file "​serial.no"​ to the installation directory and start up the Installer. You unlocked your serial number in the previous step, so running the Installer will get you a new license key. +**Note**: Only by running ​these commands as the root user can you install the server into system directoryOther users should install it to somewhere under their home directory.
-  - If you wish to copy your old installation ​directory ​over to the new hardware, then you just need to activate your license. Run command ''​./​lshttpd -r''​ to retrieve a new license key. +
-  - If the process fails, you can create a ticket with the license department in the [[https://​store.litespeedtech.com|client area]] of the online store.+
  
-=== Uninstallation Steps === +Read the **End User License Agreement** and type ''​%%Yes%%''​ to confirm your agreement. 
-  - Simply run ''​[your_install_dir]/​admin/​misc/​uninstall.sh''​ and follow the instructions on the screen. + 
-  - The Uninstaller will ask the following questions: ​+Specify the directory where you would like to install LiteSpeed Web Server. For the root user, the default is ''​%%/​usr/​local/​lsws%%''​. For non-privileged users, the default is their home directory. 
 + 
 +==== Generate License Request ​==== 
 + 
 +If the Installer only finds a serial number but no valid license key, it will prompt you to generate a license request. The installer will talk to the LiteSpeed products registration server and obtain a valid license key automatically. Upon procuring the license key, installation will proceed to the next step. 
 + 
 +If the automatic process fails, the installer will exit and leave a license request file. In this case, you can create a ticket for the license department from [[https://​store.litespeedtech.com/​store/​clientarea.php|the LiteSpeed store client area]]. 
 + 
 +==== Complete Installation ==== 
 + 
 +Follow the instructions on the screen. The Installer will ask you to set the following:​ 
 + 
 +  - If a previously installed copy exists, the Installer will ask you to choose from ''​%%upgrade%%'',​ ''​%%reinstall%%'',​ or ''​%%change directory%%''​. Upgrading will preserve your current configuration. 
 +  - Administrator'​s username and password for the WebAdmin interface. 
 +  - What control panel, if any, you will use with LSWS. 
 +  - User and group that the server process will run on behalf of. 
 +  - TCP port for normal web service. 
 +  - TCP port for WebAdmin interface. 
 +  - Whether to set up LiteSpeed PHP. 
 +  - The root user has the option to enable ''​%%chroot%%''​. The installer will set up the initial ''​%%chroot%%''​ environment automatically. Chroot is an advanced feature and your CGI may fail without configuration tuning. We strongly recommend //not// enabling chroot unless you are familiar with it. You can always enable it later by performing an upgrade installation. 
 + 
 +At the end of the installation process, the Installer will ask you if you want to install the AWStats add-on module to keep track of your web statistics. Root user can also choose to run LiteSpeed Web Server automatically at system startup as a service. 
 + 
 +Installation is complete! The Installer can now start up the server. 
 + 
 +==== Testing Installation ==== 
 + 
 +**Note**: For detailed information on controlling the server processes, please see the [[https://​www.litespeedtech.com/​docs/​webserver/​admin|Administration Guide]]. 
 + 
 +To start the server, simply run ''​%%[your_install_dir]/​bin/​lswsctrl start%%''​ from the terminal. 
 + 
 +To access your site, point your browser to ''​%%http://​[your_domain]:​8088/​%%'',​ ''​%%[your_domain]%%''​ being the IP address or domain name of your web server machine. Use ''​%%localhost%%''​ if the server is on the machine you are using. ''​%%8088%%''​ is the default port. If you changed the port during installation,​ use the port number you designated. A congratulations page should load into the browser. If not, try the WebAdmin Console. 
 + 
 +The default port for the WebAdmin Console is ''​%%7080%%''​. Point your browser to ''​%%http://​[your_domain]:​7080/​%%'',​ ''​%%[your_domain]%%''​ being the IP address or domain name of your web server machine. Use ''​%%localhost%%''​ if the server is on the machine you are using. If you changed the port for WebAdmin during installation,​ use that port instead. The WebAdmin Console welcome page should load. Click the **Log on** link and use the administrator'​s username and password specified during installation to log on. For detailed information regarding configuration,​ please refer to our [[https://​www.litespeedtech.com/​docs/​webserver/​config|Configuration Guide]], or click the **Help** link on top of each page. 
 + 
 +=== Troubleshooting === 
 + 
 +  * If your server uses a firewall, please make sure that ''​%%localhost%%''​ is trusted. For instance, Linux with IPTables should include a rule ''​%%ALLOW INPUT from LO%%''​. 
 +  * If your web site and the WebAdmin interface are inaccessible,​ please take a look at the error log - ''​%%[your_install_dir]/​logs/​error.log%%''​ 
 +  * If the error log shows a TCP port conflict with other server applications,​ the web server should be reinstalled with an available port. Use ''​%%netstat -an | grep XXXX%%''​ to find an available port, where ''​%%XXXX%%''​ is a port number. If the port is available, the command will produce no output. 
 +  * If the error log shows the swapping directory is not writable, you can either grant writing permission for the swapping directory to the user running the web server, or change the swapping directory manually. The swapping directory is configured in the server'​s XML configuration file located at ''​%%[your_install_dir]/​conf/​httpd_config.xml%%''​. Search for ''​%%<​swappingDir>​%%''​. The default value is ''​%%/​tmp/​lshttpd/​swap%%''​. 
 + 
 +If you still have problems with installation,​ please check out our [[https://​www.litespeedtech.com/​support/​wiki|wiki]] or post your problem on our support [[https://​www.litespeedtech.com/​support/​forum/​|forum]]. 
 + 
 +===== Upgrading ===== 
 + 
 +There are a few scenarios where you would need to update or upgrade the server: 
 + 
 +  * A new release is available 
 +  * Upgrade from Standard Edition to Enterprise Edition 
 +  * Upgrade from a trial license to production license 
 +  * Upgrade/​downgrade to a different production license 
 + 
 +Upgrade to the latest release, force reinstall, or downgrade to an old version using the command line tool ''​%%lsup.sh%%''​. See detailed usage information via ''​%%[your_install_dir]/​admin/​misc/​lsup.sh --help%%''​ 
 + 
 +===== Uninstalling ===== 
 + 
 +  - Simply run ''​%%[your_install_dir]/​admin/​misc/​uninstall.sh%%''​ and follow the instructions on the screen. 
 +  - The Uninstaller will ask the following questions:
     * whether to keep the log directory     * whether to keep the log directory
     * whether to keep the configuration directory     * whether to keep the configuration directory
-  - Directories that were not created by the Installer will not be touched, even if they are in [your_install_dir]. All the files created by the Installer will be removed. +  - Directories that were not created by the Installer will not be touched, even if they are in ''​%%[your_install_dir]%%''​. All the files created by the Installer will be removed. 
-  - [your_install_dir] will be removed as well, if it is empty.+  - ''​%%[your_install_dir]%%'' ​will be removed as well, but only if it is empty. 
  • Admin
  • Last modified: 2016/03/21 15:40
  • by Rob Holda