Differences

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

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
litespeed_wiki:installation:command_line [2016/03/21 14:20]
Rob Holda created
litespeed_wiki:installation:command_line [2019/03/19 16:17]
Lisa Clarke Fixed broken link
Line 1: Line 1:
 ==== Installation/​Uninstallation ==== ==== Installation/​Uninstallation ====
- 
-=== Minimum system requirements === 
- 
-  * **Operating System:** 
-    * Linux(i386):​ kernel 2.4 and up, glibc-2.2 and up 
-    * CentOS: 5 and up 
-    * Ubuntu: 8.04 and up 
-    * Debian: 4 and up 
-    * Solaris(x86):​ Sun0S 5.8 and up 
-    * FreeBSD(i386):​ 4.5 and up 
-    * MacOSX: 10.3 and up 
- 
-  * **CPU:​** ​ 
-    * Intel: 80486 and up 
-    * PowerPC: PowerPC G4 
- 
-  * **Memory:** 
-    * 32MB and up 
-  ​ 
-  * **Disk:** 
-      * Installation:​ 200MB 
-      * Runtime: 300MB and up, swapping space depends on usage. 
  
 === Installation === === Installation ===
Line 27: Line 5:
 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.+In Mac OS X, root user is disabled by default. It can be enabled using a series of actions detailed on the [[https://​support.apple.com/​en-us/HT204012|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.
  
-=== Installation Steps: ​===+== Installation Steps: ==
  
-  - Decompress the package into a convenient location:<​br>​ +  - Decompress the package into a convenient location:\\ ''​tar xvfz lsws-xxxx.tar.gz''​ or ''​gunzip -c lsws-xxxx.tar.gz | tar xvf -''​
-    - ''​tar xvfz lsws-xxxx.tar.gz''​ or ''​gunzip -c lsws-xxxx.tar.gz | tar xvf -''​+
   - **[Enterprise Edition Only]** Install trial license key or serial number:   - **[Enterprise Edition Only]** Install trial license key or serial number:
-    * Trial License:  +    * 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 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. ​ +      ​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. 
-      * 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. 
-           <p>When you switch from a trial license to a production license, you can simply run the  +    ​* ​Production license: 
-        ​install script again after following the steps below to update your license.</p> +      ​- ​Licenses can be leased or purchased at the LiteSpeed ​[[https://​store.litespeedtech.com|store]]
-      </​li>​ +      ​- ​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. 
-      <​li> ​Production license: +      ​- ​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. 
-        <​ol>​ +  ​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''​ 
-          <​li> ​Licenses can be leased or purchased at the LiteSpeed ​<a href="​http://​store.litespeedtech.com">store</a>.</li> +  ​Read the End User License Agreement and type "​Yes"​ to confirm your agreement. 
-          <​li> ​A serial number will be sent to you in the confirmation email after you order has been successfully processed. Each serial number +  ​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.  
-            ​allows for one server installation.</li> +  ​**[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. 
-          <​li> ​Save the serial number as "​serial.no";​ in the installation directory (where +  - Follow the instructions on the screen. The Installer will ask you to set the following:  
-            ​install.sh is located). ​ The LiteSpeed products registration server will use this  +    - If previously installed copy exists, the Installer will ask you to choose either upgrade, reinstall, or change directory. Upgrading will keep your current configurations. 
-            ​file to retrieve your license key during the installation process.</​li>​ +    - Administrator'​s username and password for the WebAdmin interface. 
-        </​ol> ​        +    - What control panel, if any, you will use with LSWS. 
- </​li>​ +    - User and group that the server process will run on behalf of. 
-    </ul> +    - TCP port for normal web service. 
-  ​</​li>​ +    - TCP port for WebAdmin interface. 
-  <li>  +    - Whether to set up LiteSpeed PHP. 
-   <​p>​Go to the installation directory ​<span class="​cmd">​cd lsws-xxxx</​span>​  +    - **[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. 
-    ​and run command ​<span class="​cmd">​./​install.sh</​span> ​This will start LiteSpeed'​s Installer.</​p>​ +  * 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.
-    <p>Note that only by running this command as the &quot;root&​quot; ​user can you install the server ​ +
-    ​into a system directory. Other users  +
-    ​should install it to somewhere under their home directory. ​</​p>​ +
-    <p>Mac OS X users can install the server into a system directory with command ​ +
-  <span class="​cmd">​sudo ./​install.sh</​span></​p>​ +
-  ​</​li>​ +
-   +
-  <​li> ​Read the End User License Agreement and type "​Yes"​ to confirm your agreement.</li> +
-  ​ +
-  <li>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.</​li>​ +
-    +
-  ​<li>**[Enterprise Edition Only]** <​strong>​Generate license request.</​strong>​ +
-    <p>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. </​p>​ +
-    <p>If the automatic process failed, you can create a ticket with license department ​ +
-    ​from online store client area.</​p> ​  +
-    <p>Note: Installation will continue only if there is a valid trial license or valid Enterprise license. ​</p> +
-   </li>+
  
-    <​li>​Follow the instructions on the screen. The Installer will ask you to set the following:  +=Testing Installation ​== 
-    <​ol>​ +  ​- ​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''​
-      <li> If a previously installed copy exists, the Installer will ask you to choose either +  ​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. 
-        upgrade, reinstall, or change directory. Upgrading will keep your current  +  ​The default port for the WebAdmin interface is 7080. Plug **<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 [[https://​www.litespeedtech.com/​docs/​webserver/​config|Configuration Guide]], or click the "​help"​ link on top of each page. 
-        configurations.</​li>​ +  ​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''​
-      <li> Administrator'​s username and password for the WebAdmin interface.</​li>​ +  ​If your web site and the WebAdmin interface are inaccessible,​ please take a look at the error log - ''​[your_install_dir]/​logs/​error.log''​ 
-      <li> What control panel, if any, you will use with LSWS.</​li>​ +    ​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. 
-      <li> User and group that the server process will run on behalf of.</​li>​ +    ​* ​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>​''​.
-      <li> TCP port for normal web service.</​li>​ +
-      <li> TCP port for WebAdmin interface. </​li>​ +
-      <li> Whether to set up LiteSpeed PHP. +
-      <li> <span class="​tag">​[Enterprise Edition Only]</​span>​ 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.  +
-    </​ol>​ +
-    <p> +
-    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.</​p>​ +
-  </​li>​ +
-</​ol>​ +
-<h4>Testing Installation</h4> +
-<​ol>​ +
-<​li> ​For detailed information on controlling the server processes, ​  +
-    ​please see the <a href="/​docs/​webserver/​admin">Administration Guide</a>. To start the server, ​ +
-    ​simply run <span class="​cmd">​[your_install_dir]/​bin/​lswsctrl start</​span>​+
-  ​</​li>​ +
-   +
-  <​li> ​To access your site,  +
-    ​point your browser to <span class="​val"​>​http://​[address]:​8088/</​span>,  +
-    ​[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. +
-  ​</​li>​ +
-   +
-  <​li> ​The default port for the WebAdmin interface is 7080. Plug  +
-    ​<span class="​val"​>​http://​[address]:​7080/</​span>,  +
-    ​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 <a href="/​docs/​webserver/​config">Configuration +
-    ​Guide</a>, or click the "​help"​ link on top of each page.  +
-  ​</​li>​ +
-   +
-  <​li> ​If your server uses firewall, please make sure that localhost is trusted. ​ +
-    ​For instance, Linux with IPTables should include a rule <span class="​cmd">​ALLOW  +
-    ​INPUT from LO</​span>​. +
-    <br> +
-  ​</​li>​ +
-  <​li> ​If your web site and the WebAdmin interface are inaccessible,​ please take  +
-    ​a look at the error log - <span class="​cmd">​[your_install_dir]/​logs/​error.log  +
-    ​</​span>​ +
-    <​ul>​ +
-      <​li> ​If there is a TCP port conflict with other server applications, ​ +
-        ​the web server should be reinstalled with an available port.<​br>​ +
-        ​The following command can be used to find an available port:<​br>​ +
-        <span class="​cmd">​netstat -an | grep XXXX</​span><​br>​ +
-        ​XXXX is a port number. If the port is available, the command will produce no  +
-        ​output. +
-      </​li>​ +
-      <​li> ​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 <span class="​cmd">​[your_install_dir]/​conf/​httpd_config.xml</​span>​ +
-        ​default value is <span class="​cmd">​/​tmp/​lshttpd/​swap</​span>​. Search for  +
-        ​<span class="​cmd">&​lt;​swappingDir&​gt;</​span>. +
-      </​li>​ +
-    </​ul>​ +
-  </​li>​ +
-</​ol>​ +
-<p>If you still have problems with installation,​ please check out our  +
-<a href="​http://​www.litespeedtech.com/​support/​wiki">​wiki</​a>​ or post your problem  +
-on our support <a href="​http://​www.litespeedtech.com/​support/​forum/">​forum</​a>​. </p>+
  
 +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]].
  
-<h3>Upgrading</h3>+=== Upgrading ​===
  
-<p>There are a few scenarios where you would need to update or upgrade the server:</p>+There are a few scenarios where you would need to update or upgrade the server:
  
-<​ul>​ +  * A new release is available 
-<li>A new release is available</li> +  ​* ​Upgrade from Standard Edition to Enterprise Edition 
-<li>Upgrade from Standard Edition to Enterprise Edition</li> +  ​* ​Upgrade from a trial license to production license 
-<li>Upgrade from a trial license to production license</li> +  ​* ​Upgrade/​downgrade to a different production license
-<li>Upgrade/​downgrade to a different production license.</​li>​ +
-</ul>+
  
-<p>There are a number of ways to upgrade. One way is to just run install.sh again and select  +There are a number of ways to upgrade. One way is to just run install.sh again and select  
-&quot;Upgrade&​quot; ​when prompted. Your current configurations will be kept.</p>+"Upgrade" ​when prompted. Your current configurations will be kept.
  
-<p>Starting with release 2.0, version management can also be done from the WebAdmin interface, ​+Starting with release 2.0, version management can also be done from the WebAdmin interface, ​
 under Actions - Version Management. All your installed versions and the available new releases ​ under Actions - Version Management. All your installed versions and the available new releases ​
 are listed here. You can install a new release or switch between different versions by  are listed here. You can install a new release or switch between different versions by 
 clicking the appropriate link. Since release 2.0, LSWS also features a built-in update agent  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.</p>+that will check for new releases periodically and send email notifications.
  
-<p>Starting with release 4.1, you can upgrade to the latest release, force reinstall, or downgrade ​ +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''​
-to an old version using the command line tool lsup.sh. See detailed usage information in  +
-<span class="​cmd">​[your_install_dir]/​admin/​misc/​lsup.sh --help</​span></​p>​+
  
-<p>Since release 1.5.6, multiple versions of LiteSpeed Web Server can be installed. ​ +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''​.  
-    ​You can easily switch from one to another by using the version management utility: ​ +  ​* ​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''​ 
-    <span class="​cmd">​[your_install_dir]/​admin/​misc/​mgr_ver.sh</​span>​.</​p> ​ +  ​* ​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''​
-<​ul><​li>​To switch to a version already installed, for example 1.5.6, just run <span class="​cmd">​[your_install_dir_current_version]/​admin/​misc/​mgr_ver.sh ​ +
-        ​1.5.6</​span></​li>​ +
-  <li>To remove previously installed files for a certain version, for example 1.5.6, ​ +
-        ​just run <span class="​cmd">​[your_install_dir_current_version]/​admin/​misc/​mgr_ver.sh ​ +
-        ​-d 1.5.6</​span>​ </​li>​ +
-</ul>+
  
-<p>When upgrading your license (from trial to production license, for example), you can manually  +When upgrading your license (from trial to production license, for example), you can manually  
-copy "​serial.no"​ to the <span class="​cmd">​[your_install_dir]/​conf/​</​span>​  +copy "​serial.no"​ to the ''​[your_install_dir]/​conf/​'' ​directory, then restart. Please backup your old serial number and license key before restart.
-directory, then restart. Please backup your old serial number and license key before restart. +
-</p>+
  
 +=== License transfer procedure: ===
  
-<​h3>​License transfer procedure: </​h3>​ +Please be aware that each license key is associated with a serial number ​
- +
-<p>Please be aware that each license key is associated with a serial number ​+
 and the server'​s hardware signature. A new key is required if a change ​ and the server'​s hardware signature. A new key is required if a change ​
 in hardware signature is detected. So if you upgrade or change your hardware, ​ in hardware signature is detected. So if you upgrade or change your hardware, ​
-you need to transfer your current production license in order to continue using the product. ​</​p>​ +you need to transfer your current production license in order to continue using the product. ​
- +
-<​ol>​ +
- <​li>​ To migrate your current license, you can simply run the server binary  +
-  <span class="​cmd">​./​lshttpd -m</​span>​. It will talk to LiteSpeed'​ 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.</​li>​ +
-<li> 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.</​li>​ +
- <​li>​If you wish to copy your old installation directory over to the new hardware,  +
- then you just need to activate your license. +
-   Run command <span class="​cmd">​./​lshttpd -r</​span>​ to retrieve a new license key.</​li> ​  +
- <​li>​If the process fails, you can create a ticket with the license  +
-  department in the <a href="​https://​store.litespeedtech.com">​client  +
-  area</​a>​ of the online store. </​li>​ +
-</ol>+
  
 +  - 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.
 +  - 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.
 +  - 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.
  
-<h3>Uninstallation Steps</​h3>​ +=== Uninstallation Steps === 
-<ol> +  ​Simply run ''​[your_install_dir]/​admin/​misc/​uninstall.sh'' ​and follow the instructions on the screen. 
-  ​<li>Simply run <span class="​cmd">​[your_install_dir]/​admin/​misc/​uninstall.sh</​span>​  +  ​The Uninstaller will ask the following questions:  
-    ​and follow the instructions on the screen. +    ​whether to keep the log directory 
-  ​</​li>​ +    ​* ​whether to keep the configuration directory 
-  <li>The Uninstaller will ask the following questions:  +  ​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. 
-    ​<​ul>​ +  ​[your_install_dir] will be removed as well, if it is empty.
-      <li>whether to keep the log directory</li> +
-      <​li>​whether to keep the configuration directory</​li>​ +
-    </​ul>​ +
-    <​br>​ +
-  </li> +
-  ​<li>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. +
-  ​</​li>​ +
-  <li>[your_install_dir] will be removed as well, if it is empty. ​</​li>​ +
-</ol>+
  • Admin
  • Last modified: 2022/02/17 18:35
  • by Lisa Clarke