How to install OpenLiteSpeed ​​Web Server on AlmaLinux 8 / Rocky Linux 8

Steps to download, install, configure, set up and run OpenLiteSpeed ​​web server on Rocky Linux 8 and AlmaLinux 8 using command terminal

OpenLite Speed is an open source HTTP server version of the paid LightSpeed ​​web server developed and owned by LiteSpeed ​​Technologies. Although it is new compared to the powerful Apache web server, however, it is popular for its high performance, lightness and extreme speed. The loading time with Openlitespeed is a bit better than with Nginx. You don’t need any extra module here either, Openlitespeed is almost ready to go. Moreover, it provides a graphical dashboard to easily manage virtual hosts, modules and web servers.

We don’t need any additional plugins in WordPress to minify, cache, compress and convert while using OpenLiteSpeed. Even deliver WebP directly through the web server.

Well, the paid version known as LiteSpeed ​​Web Server Enterprise Edition (LSWS) is designed to meet the business web hosting demand by delivering the fastest possible performance to multiple websites.

However, the open-source version we are going to install here is similar to the enterprise but lacks a few third-party plugins for compatibility with cPanel, Plesk, and other control panels. Also, the enterprise version offers a more powerful caching engine, full compatibility with Apache, and commercial support.

Steps to Install OpenLiteSpeed ​​on Rocky Linux 8 / Almalinux 8

The steps given here can also be used for other RHEL 8 based Linux systems such as Oracle 8, CentOS 8 and others.

1. Add OpenLiteSpeed ​​Linux Repository

Unlike Apache HTTPd, the packages to install OpenLiteSpeed ​​are not available in the default Rocky or AlmaLinux 8 repository. Therefore, we have to add it manually using the command below.

sudo rpm -Uvh

2. Enable Epel Repository

A few packages required by OpenLiteSpeed ​​are available through the Extra Enterprise repository. Hence, enable the same.

sudo dnf install epel-release

3. Run Rocky or AlmaLinux update command

To ensure that the system can successfully recognize packages available in newly added repositories.

sudo dnf update

Note: If you receive a warning:

Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/litespeed.repo; 
Configuration: OptionBinding with id "failovermethod" does not exist

Then to remove it just edit the repository added to LightSpeed.

sudo nano /etc/yum.repos.d/litespeed.repo

And add # in front of each line with “failover method“.

4. Command to install OpenLiteSpeed ​​Almalinux or Rocky 8

Finally, we have everything we need to install and configure the OpenLiteSpeed ​​web server on your Rocky Linux 8 or AlmaLinux 8 server using the DNF package manager.

sudo dnf install openlitespeed

command to install openspeedlite almalinux 8

5. Install PHP for OpenLiteSpeed

According to your requirementchoose the last PHP 8.0 or the sooner PHP 7.4. We have mentioned the commands for both, use one of the given ones.

For PHP 7.4

sudo dnf install lsphp74 lsphp74-mysqlnd lsphp74-process lsphp74-bcmath lsphp74-pdo 
lsphp74-common lsphp74-xml lsphp74-mbstring lsphp74-mcrypt 
lsphp74-soap lsphp74-gd lsphp74-opcache

Install PHP 7.4 for LiteSPeed Web Server

For PHP 8.0

sudo dnf install lsphp80 lsphp80-mysqlnd lsphp80-process lsphp80-bcmath lsphp80-pdo 
lsphp80-common lsphp80-xml lsphp80-mbstring lsphp80-gd lsphp80-opcache lsphp80-soap

Install PHP 8.0 OpenSpeeLite Web Server

6. Check Web Server Status

To confirm that the web server‘s OpenLiteSpeed ​​service is up and working perfectly, run the status commands:

sudo systemctl status lsws

Anecdotes: AT Stop and reboot the command are:

sudo systemctl stop lsws
sudo systemctl start lsws
sudo systemctl restart lsws

7. Open the required ports in the firewall

Apart from 80/443 for websites/webpages we also need 8088 & 7080 ports to access the web interface to manage the OpenLiteSpeed ​​from the browser.

sudo firewall-cmd --zone=public --permanent --add-port={80/tcp,443/tcp,8088/tcp,7080/tcp}
sudo firewall-cmd --reload

8. Create an administrator password

By default, the OpenLiteSpeed ​​web server administrator the web console will use a common username and password. To change it to something strong and easy to remember, run the following command:

sudo /usr/local/lsws/admin/misc/

Set OpenSpeed ​​Lite administrator password

9. Go to OpenLiteSpeed ​​Web Interface – Demo and Admin

There are two web interfaces provided by this open source web server, one is to access the Demo page to check version PHP, CGI and other things work fine. And the other is Administrator Dashboard to manage virtual host, PHP and other settings.

For the demo page:


OpenLiteSpeed ​​demo page

For the admin page:


OpenLiteSpeed ​​admin page

Web Server GUI Admin Page


So here are the simple steps to get, configure, install and run OpenLiteSpeed ​​web server on Rocky Linux 8 and AlmaLinux 8 using command terminal.

Other Items:

• How to install Apache, MySQL and PHP on AlmaLinux 8
• Automatically install security patches or updates on Rocky or AlmaLinux
• How to install Podman on Rocky / AlmaLinux 8
• How to install Apache on Almalinux 8/Rocky