Upgrading OpenLiteSpeed

You are here:
< Back

There are two different methods for upgrading your version of OpenLiteSpeed:

  1. LiteSpeed repository
  2. Binary install

In order to avoid complications, always upgrade or downgrade using the same method you used to install OpenLiteSpeed originally.

There is one exception to this rule. OpenLiteSpeed is generally available in two branches: the stable branch, and the edge branch. The LiteSpeed repository only keeps versions of the stable branch available. For example, at the time of this writing, the latest OpenLiteSpeed version is 1.6.1, but only versions in the 1.5.x branch are available in the LiteSpeed repo. As such, you cannot upgrade from 1.5.x to any 1.6.x version from the repo. If you wish to do this, please see Method 3.

Method 1: LiteSpeed Repository

If you installed OLS through the LiteSpeed repository before, you should simply run the package update command:

For CentOS:

yum update OpenLiteSpeed

For Debian & Ubuntu:

apt-get upgrade OpenLiteSpeed

Method 2: Binary Install

If you installed OLS by downloading the package and running ./install.sh, you will need to do the same to upgrade. For example, you could upgrade from 1.5.x to 1.6.1 like so:

wget https://openlitespeed.org/packages/openlitespeed-1.6.1.tgz
tar -zxvf OpenLiteSpeed-*.tgz
cd OpenLiteSpeed
./install.sh

Method 3: Latest Branch via Binary Install

As we explained, the LiteSpeed repository can only upgrade to the latest version of the stable branch. If you wish to upgrade to the latest edge version, you will need to uninstall the repo version and re-install via the binary package, like so:

  1. Back up your entire OLS configuration.
  2. Uninstall OLS through yum or apt-get, as appropriate, to avoid accidentally downgrading in the future.
  3. Copy the OLS configuration backup to /usr/local/lsws/conf/.
  4. Download the latest binary package from https://openlitespeed.org/downloads/, unpack, and run ./install.sh

Method 4: New lsup.sh script

A more recent addition to OpenLiteSpeed is the lsup.sh script. It works similarly to the LiteSpeed Enterprise lsup.sh script, and allows you to upgrade or downgrade OLS to a particular version.

You can download latest lsup.sh through:

wget https://raw.githubusercontent.com/litespeedtech/openlitespeed/master/dist/admin/misc/lsup.sh

NOTE: If you wish to use lsup,sh, you must have installed OpenLiteSpeed via binary install or source code install. It cannot have been installed through yum or apt-get. If you did install OLS through yum or apt-get, you will need to uninstall it through package management, and reinstall through binary or source code installation before using lsup.sh.

Running ./lsup.sh will update to the lastest stable version, and ./lsup.sh -d will update to the lastest stable DEBUG version.

 

Additionally, these options are available:

Usage: lsup.sh [-t] | [-c] | [[-d] [-r] | [-v VERSION]]
  -a
     Update web admin password
  -d
     Choose Debug version to upgrade or downgrade, will do clean like -c at the same time.
  -v VERSION
     If VERSION is given, this command will try to install specified VERSION. Otherwise, it will get the latest version from /usr/local/lsws/autoupdate/release.
  -r 
     Recover to the originally installed version which is in file VERSION.
  -p
     Recover to the previously installed version which was renamed to .old files.
  -t
     To test openlitespeed running status.
  -c
     Do some cleanup and restart openlitespeed service.
  -h | --help     
     Display this help and exit.
  -g 
     Toggle DEBUG log

lsup.sh is not only a very powerful tool to upgrade/downgrade OLS, but also an installation tool if OLS has not yet been installed on the server.

Tags: