Upgrading/Downgrading OpenLiteSpeed

How Can We Help?
< Back
You are here:
Print

There are three different methods for upgrading or downgrading your version of OpenLiteSpeed:

  1. LiteSpeed repository
  2. lsup.sh script
  3. Binary install

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

NOTE: If you are using OLS on DirectAdmin, please don’t use any of these methods. Please see How to Upgrade OLS on DirectAdmin.

When installing OpenLiteSpeed through LiteSpeed repository, the normal LiteSpeed repository only keeps versions of the stable version available. For example, at the time of this writing, the latest OpenLiteSpeed version is 1.8.1, but only versions in the 1.7.x branch are available in the LiteSpeed repository. To upgrade to the latest version in the edge branch, you will need to upgrade it via lsup script. (Reminder: binary install should not be mixed with repository installation, but it does sometimes happen accidentally).

Method 1: LiteSpeed Repository

If you installed OpenLiteSpeed through the LiteSpeed repository before, you should simply run the package update command.

CentOS Upgrade

yum update openlitespeed

CentOS Downgrade

You can downgrade to any specific version that the repository supports.

  1. Find all of the available versions from the repository
    yum --showduplicates list openlitespeed
  2. Run the downgrade command with the version you need
    yum downgrade openlitespeed-1.7.19

Debian & Ubuntu Upgrade

apt-get upgrade openlitespeed

Debian & Ubuntu Downgrade

Downgrade to a version from the history list

  1. Find all of the installed available versions from apt
    apt-cache policy openlitespeed
  2. Run the downgrade command with the version you need
    apt install openlitespeed=1.7.19-3+jammy

Downgrade to any specific version that the repository supports

  1. Search available OpenLitespeed versions from repository
  2. Download the specific version, e.g. openlitespeed_1.7.19-3+jammy_amd64.deb package
    wget https://rpms.litespeedtech.com/debian/pool/main/jammy/openlitespeed_1.7.19-3%2Bjammy_amd64.deb
  3. Install the package
    dpkg -i openlitespeed_1.7.19-3+jammy_amd64.deb

Method 2: lsup.sh Script

The lsup.sh script works similarly to the LiteSpeed Enterprise lsup.sh script, and allows you to upgrade or downgrade OLS to a particular version.

You can download the latest lsup.sh with the following command if /usr/local/lsws/admin/misc/lsup.sh does not exist:

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

Note: If you did install OLS through yum or apt-get, it’s fine to upgrade to other versions with lsup command.

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

Additionally, these options are available:

Usage: lsup.sh [-t] | [-c] | [[-d] [-r] | [-v VERSION]] | [-e 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 install the specified VERSION. Otherwise, it will get the latest version from /usr/local/lsws/autoupdate/release.
  -e VERSION 
     Upgrade/downgrade to specified VERSION without making any other changes. The version listed in /usr/local/lsws/VERSION does not change.
  -r 
     Restore the originally installed version which is in file VERSION.
  -p
     Restore 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.

To test a particular version temporarily, use the -e VERSION option, run your tests, and then use the -r option to restore the original version listed in /usr/local/lsws/VERSION.

Commonly used example:

/usr/local/lsws/admin/misc/lsup.sh -v 1.8.1

Method 3: 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.6.x to 1.7.19 like so:

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

Switch from Repo to Binary Installation

Most of the time, you should not need to switch from repo installation to binary or lsup.sh script installation, or vice versa. If you wish to do so for some reason, please do the following:

  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. Alternatively, you can use the lsup.sh script.
Tags: