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

OpenLiteSpeed ​​is a fast open source web server application that comes with a fast PHP module built in.

This tutorial will show you how to install and configure OpenLiteSpeed ​​on Rocky Linux 8 and CentOS 8.

To install OpenLiteSpeed, you will need the following:

  1. Non-root users have sudo privileges.
  2. Rocky Linux 8 or CentOS 8 server with at least 6GB disk space when installed (8GB recommended).
  3. Recent versions of the wget and curl command line tools are also required.

System update

OpenLiteSpeed ​​is compatible with the Linux Rocky Linux 8, Alma Linux 8 and centOS 8 operating systems. The first thing to do is update the system and make sure OpenLiteSpeed ​​can be installed. Use the following commands to update your system.

sudo dnf clean all sudo dnf -y update sudo dnf install -y epel-release

Add OpenLiteSpeed ​​RPM Package

It's time to add RPM to your system. The process is very simple and can be done with one command. The OpenLiteSpeed ​​RPM package is a software package that includes OpenLiteSpeed ​​and all its dependencies. It also handles switching to the OpenLiteSpeed ​​daemon if you have any other web servers running on the server.

Run the command below to add the OpenLiteSpeed ​​RPM package. The rpm -Uvh part of the OpenLiteSpeed ​​RPM install command from the link provided by Litespeedtech This command also upgrades any existing packages currently installed on the system.

sudo rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm

Install OpenLiteSpeed ​​Web Server

Now that you have the RPM package installed and the OpenLiteSpeed ​​repository activated, the next step is to install OpenLiteSpeed.

Run the command below to install OpenLiteSpeed ​​Web Server on Centos 8 system.

sudo dnf install openlitespeed -y

Configure OpenLiteSpeed ​​Web Server

OpenLiteSpeed ​​is installed now. You need to run some commands to continue the configuration process. You should not make any changes to your site until the configuration of OpenLiteSpeed ​​has been successfully completed. This will ensure that the back-end and front-end of the website remain in sync as changes are made to the code and files in the process.

The default password for OpenLiteSpeed ​​is: 123456. You should at least change it to something more secure before completing the installation.

You can change the default password by running the admpass.sh command below. admpass.sh is designed to generate the admin password string. It uses the language of a file named addpass.php provided with the OpenLiteSpeed ​​distribution and then applies that language to the local LSWS installation by hardcoding it in an automatically generated script.

/usr/local/lsws/admin/misc/admpass.sh

Provide a username which is the username you want to use for your LSWS admin account. Provide a password containing at least 6 random syllables of your choice.

Run the commands below to start and check the status of the lsws service.

sudo systemctl start lsws sudo systemctl status lsws

You will get the following results.

How to install OpenLiteSpeed ​​Web Server on Rocky Linux 8 Picture 1How to install OpenLiteSpeed ​​Web Server on Rocky Linux 8 Picture 1

Firewall configuration

Now that you have successfully installed OpenLiteSpeed, it's time to open some ports for OpenLiteSpeed ​​on the firewall. This is where OpenLiteSpeed ​​communicates with clients.

OpenLiteSpeed ​​uses ports 7080 and 8080 by default. You need to open these ports on your firewall so that clients can access OpenLiteSpeed ​​and publish webpages

  1. Port 7080 is the default listening port for OpenLiteSpeed ​​Web Server. This is the port that the server will use to listen to requests coming from clients.
  2. Port 8088 is the default port for HTTP. This is the port that any web browser will use to connect to your OpenLiteSpeed ​​server. To open these ports, you will use the iptables commands.

Run the command below to open port 8088 and tcp on your firewall.

sudo firewall-cmd --zone=public --permanent --add-port=8088/tcp

Run below command to open port 7080 and tcp port on your firewall.

sudo firewall-cmd --zone=public --permanent --add-port=7080/tcp

Run the command sudo firewall-cmd –reload to apply the new firewall rules.

sudo firewall-cmd --reload

Through this tutorial, you learned how to install and configure OpenLiteSpeed ​​Web Server on Rocky Linux and CentOS. If you want to learn more about setting up and working with OpenLiteSpeed ​​Web Server, please visit its official documentation page for more information here.

4 ★ | 1 Vote