Table of Contents
This tip is about the how to Run OpenLiteSpeed Web Server on Rocky Linux 8 and AlmaLinux 8. So read this free guide, How to Run OpenLiteSpeed Web Server on Rocky Linux 8 and AlmaLinux 8 step by step. If you have query related to same article you may contact us.
How to Run OpenLiteSpeed Web Server on Rocky Linux 8 and AlmaLinux 8 – Guide
OpenLiteSpeed is a free open source web server that you can use to target and serve websites. Offers numerous features to make your experience more consistent, for example custom handling of PHP with smoothed guidelines on how best to use it or managerial interfaces that will allow you to handle all parts of site updates in one place, without the need to many scripts scattered in better places in town.
It is a multi-stage web server that works admirably with all operating systems and is notable for its extremely fast speed. You can use, modify or even relocate OpenLiteSpeed according to the LGPL license details. What’s more, you can effortlessly find support from different users in message sheets, as it has been around for over ten years.
prerequisites
Index
Related articles
Update Rocky Linux Repositories
First, we need to update our system so that our repositories are up Until the present date. This is the first step whenever you are doing any installation on the system. Type the following command into our terminal.
$ sudo dnf update -y
When the update is complete, proceed to add OpenLiteSpeed to the repository.
Add OpenLiteSpeed to EPEL repository
To add OpenLiteSpeed to our repository on Rocky 8 Linux, type the following into our terminal;
$ sudo dnf install epel-release
Sample output
…. Running transaction verification Transaction verification successful. Running Transaction Test The transaction test was successful. Running the transaction Preparing: 1/1 Installing: epel-release-8-13.el8.noarch 1/1 Running the scriptlet: epel-release-8-13.el8.noarch 1/1 Checking: epel-release-8- 13. el8.noarch 1/1 installed: epel-release-8-13.el8.noarch completed!
Add OpenLiteSpeed to our repository
$ sudo rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm
Retrieving http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm
Checking… ####################################### [100%]
Preparing… ################################# [100%]
Updating / installing…
1: litespeed-repo-1.2-1.el8 ##################################### [100%]
Install OpenLiteSpeed on Rocky Linux / AlmaLinux
Now that we’ve added the OpenLiteSpeed Repository to our system, we can install OpenLiteSpeed with the following command:
$ sudo dnf install openlitespeed
After installation is complete, you check the status of the OpenLiteSpeed server with the following command;
$ # sudo systemctl status lsws ●
lshttpd.service – OpenLiteSpeed HTTP server
Loaded: loaded (/usr/lib/systemd/system/lshttpd.service; enabled; vendor default: disabled)
Active: active (running) since Fri 2021-11-12 12:22:52 UTC; 1min 41s ago
Process: 63411 ExecStart = / usr / local / lsws / bin / lswsctrl start (code = exited, status = 0 / SUCCESS)
Main PID: 63435 (lite speed)
CGroup: /system.slice/lshttpd.service
├─63435 openlitespeed (lshttpd – main)
├─63439 openlitespeed (lscgid)
└─63452 openlitespeed (lshttpd – # 01)
12 November 12:22:49 rockylinuxd system[1]: Starting OpenLiteSpeed HTTP Server…
November 12 12:22:50 rockylinux lswsctrl[63411]: [OK] litespeed: pid = 63435.
12 November 12:22:52 rockylinuxd system[1]: OpenLiteSpeed HTTP server started.
Must show status as active so we can continue with this tutorial. Otherwise, start your server first with the following command
$ / usr / local / lsws / bin / lswsctrl start.
Install PHP for OpenLiteSpeed
PHP is not built into OpenLiteSpeed as is the case with Apache. OpenLiteSpeed delegates PHP execution to external PHP executables. This will allow for better security, stability and handling of multiple connections. Start the PHP74 installation with the following command.
$ sudo dnf -y install lsphp74 lsphp74-common lsphp74-mysqlnd lsphp74-gd lsphp74-process lsphp74-mbstring lsphp74-xml lsphp74-mcrypt lsphp74-pdo lsphp74-imap lsphp74-soap
Once the PHP74 installation is complete, we can now move on to installing the MySQL server
Install MySQL Server
You can run the following command to install MySQL server
$ sudo dnf install mysql mysql-server
Run the secure install script to make MyQL secure, but first you need to start the mysqld service;
$ sudo systemctl start mysqld
$ sudo systemctl enable mysqld
Check the status now with the following command;
$ sudo systemctl status mysqld
Sample output
● mysqld.service – MySQL 8.0 database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor default: disabled)
Active: active (running) since Fri 2021-11-12 12:56:55 UTC; 2min 48s ago
Primary PID: 66270 (mysqld)
Status: “The server is operational”
Tasks: 37 (limit: 11189)
Memory: 458.0M
CGroup: /system.slice/mysqld.service
└─66270 / usr / libexec / mysqld –basedir = / usr
12 November 12:56:47 rockylinux systemd[1]: Starting MySQL 8.0 Database Server…
November 12 12:56:47 rockylinux mysql-prepare-db-dir[66189]: Initializing the MySQL database
12 November 12:56:55 rockylinux system[1]: MySQL 8.0 database server started.
Now it’s time to run our secure installation, do the following;
$ sudo mysql_secure_installation
To facilitate logging into the system, it is best not to set a validation password. Enter N and at subsequent prompts, you can enter Y to allow the installation to continue. When it’s finished, we can proceed to set up OpenLiteSpeed Admin Panel.
Configure the OpenLiteSpeed admin panel
To change the default password on the OpenLiteSpeed panel, we need to run the following command;
$ /usr/local/lsws/admin/misc/admpass.sh
Sample output
# Specify the administrator username.
This is the username required to login to the administration web interface.
Username [admin]: admin
Specify the administrator password.
This is the password required to log in to the administration web interface. Password:
Enter the password again:
The admin username / password has been updated successfully!
We’ve added the administrator successfully, now it’s good to configure the firewall to allow OpenLiteSpeed to run successfully.
Configure firewall settings
OpenLiteSpeed listens on ports 8088 and 7080, so we must allow access to these ports. To do this, we can do the following;
$ firewall-cmd –zone = public –permanent –add-port = 8088 / tcp
Do the same for port 7080
$ firewall-cmd –zone = public –permanent –add-port = 7080 / tcp
So you need to reload the system for the changes to take effect.
$ sudo firewall-cmd –reload
If, in case you have problems with the following, make sure that firewalld is up and running. Run the following command to enable it.
$ systemctl enable –now firewalld
Lastly, we can test our OpenLiteSpeed to see if it is running with the following in your preferred browser;
http: //
To access the admin site, we need to use port 7080 like this
http: //
Final note
I hope you like the guide How to Run OpenLiteSpeed Web Server on Rocky Linux 8 and AlmaLinux 8. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.