How to install OpenLiteSpeed on Linux 9

Share on Social Media

In this Linux tutorial, you will learn how to install OpenLiteSpeed on Rocky Linux 9 or other Red Hat based Linux distributions. #centlinux #linux #openlitespeed

What is OpenLiteSpeed?:

OpenLiteSpeed is the open-source edition of LiteSpeed Web Server (LSWS). LiteSpeed Web Server is proprietary web server software. It is the 4th most popular web server, estimated to be used by 10% of websites as of July 2021. LSWS is developed by privately held LiteSpeed Technologies. The software uses the same configuration format as Apache HTTP Server and is compatible with most Apache features. An open-source variant is also available.

OpenLiteSpeed combines speed, security, scalability, optimization and simplicity in one friendly open-source package. (Source: Wikipedia)

Video to install OpenLiteSpeed on Linux:

YouTube player

Environment Specification:

We are using a minimal Rocky Linux 9 virtual machine with following specifications.

  • CPU – 3.4 Ghz (2 cores)
  • Memory – 2 GB
  • Storage – 20 GB
  • Operating System – Rocky Linux release 9.1 (Blue Onyx)
  • Hostname –
  • IP Address –

Prepare your Rocky Linux Server:

By using a ssh client, login to your Linux machine as root user. If you are a Linux newbie then we recommend that you should read Linux for Beginners (PAID LINK) by Ethem Mining before deep diving into Linux commandline.

Set a hostname (FQDN) and Local DNS resolution for your Linux Server. Or you can configure a DNS Server for your network.

# hostnamectl set-hostname
# echo " web-01" >> /etc/hosts

It is a best practice to update software packages in your Linux operating system, before installation or configuration of a new software.

Therefore, execute dnf command to update your Linux operating system.

# dnf update -y

If your Linux Kernel is updated by the above command, then you should reboot your Linux server with the new Kernel.

# reboot

Note down the versions of Linux Kernel and Linux operating system.

# cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.1 (Blue Onyx)"
ID_LIKE="rhel centos fedora"
PRETTY_NAME="Rocky Linux 9.1 (Blue Onyx)"

# uname -r

Install Third Party Yum Repositories:

First of all, install wget command, because you will need it to download and install third party yum repositories.

# dnf install -y wget

Execute following Linux command to install LiteSpeed Official repository.

# wget -O - | sudo bash
--2023-04-18 16:47:24--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4739 (4.6K) [application/octet-stream]
Saving to: ‘STDOUT’

-                   100%[===================>]   4.63K  --.-KB/s    in 0.04s

2023-04-18 16:47:27 (132 KB/s) - written to stdout [4739/4739]

/tmp ~
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1798  100  1798    0     0   1542      0  0:00:01  0:00:01 --:--:--  1540
LiteSpeed repository has been setup!

OpenLiteSpeed software requires some software packages from EPEL and REMI yum repositories. Therefore, install both of them by using following dnf commands.

# dnf install -y epel-release
# dnf install -y

Build yum cache for newly installed yum repositories.

# dnf makecache
Extra Packages for Enterprise Linux 9 - x86_64  7.5 kB/s | 6.0 kB     00:00
LiteSpeed Tech Repository for CentOS 9 - x86_64 7.7 kB/s | 3.6 kB     00:00
LiteSpeed Tech Update Repository for CentOS 9 - 7.9 kB/s | 3.6 kB     00:00
Remi's Modular repository for Enterprise Linux  636  B/s | 833  B     00:01
Remi's Modular repository for Enterprise Linux  3.0 MB/s | 3.1 kB     00:00
Importing GPG key 0x478F8947:
 Userid     : "Remi's RPM repository ( <>"
 Fingerprint: B1AB F71E 14C9 D748 97E1 98A8 B195 27F1 478F 8947
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi.el9
Is this ok [y/N]: y
Remi's Modular repository for Enterprise Linux  426 kB/s | 882 kB     00:02
Safe Remi's RPM repository for Enterprise Linux 834  B/s | 833  B     00:00
Safe Remi's RPM repository for Enterprise Linux 3.0 MB/s | 3.1 kB     00:00
Importing GPG key 0x478F8947:
 Userid     : "Remi's RPM repository ( <>"
 Fingerprint: B1AB F71E 14C9 D748 97E1 98A8 B195 27F1 478F 8947
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi.el9
Is this ok [y/N]: y
Safe Remi's RPM repository for Enterprise Linux 492 kB/s | 910 kB     00:01
Rocky Linux 9 - BaseOS                          1.3 kB/s | 4.1 kB     00:03
Rocky Linux 9 - AppStream                       1.2 kB/s | 4.5 kB     00:03
Rocky Linux 9 - Extras                          1.2 kB/s | 2.9 kB     00:02
Metadata cache created.

Install OpenLiteSpeed Web Server:

Execute following command at Linux terminal to install OpenLiteSpeed and dependent software packages.

# dnf install -y openlitespeed

PHP 7.2 is already installed with OpenLiteSpeed software. However, if you want to install PHP 8.1 then you can use following Linux command.

# dnf install -y lsphp81 lsphp81-common lsphp81-mysqlnd lsphp81-gd lsphp81-process lsphp81-mbstring lsphp81-xml lsphp81-pdo lsphp81-imap lsphp81-soap lsphp81-bcmath

The OpenLiteSpeed web server has been installed successfully. Default installation directory is /usr/local/lsws.

OpenLiteSpeed installation process generates a random password for admin user. You can get this password by displaying the content of the file by using cat command.

# cat /usr/local/lsws/adminpasswd
Web Admin user/password is admin/MTUzN2Qw

Note down the admin password for future use.

Enable and start OpenLiteSpeed service.

# systemctl enable --now lsws

Configure Linux Firewall:

OpenLiteSpeed uses port 8088/tcp for websites and port 7080/tcp for its web admin console.

You need to allow both of these ports in Linux Firewall to enable network access.

# firewall-cmd --permanent --add-port={8088,7080}/tcp
# firewall-cmd --reload

Access OpenLiteSpeed Web Server:

Open URL in web browser.


You can also access the OpenLiteSpeed Web Admin Console at


Login as admin user and auto-generated password.


You have reached at the Dashboard of OpenLiteSpeed Web Admin Console.

Conclusion – Install OpenLiteSpeed on Linux:

In this Linux tutorial, you have learned how to install OpenLiteSpeed on Linux 9 or other Red Hat based Linux distributions. To start hosting awesome websites with OpenLiteSpeed web server, we recommend that, you should attend online training LiteSpeed Fundamentals