How To Install OpenLiteSpeed Stack on AlmaLinux 8

Introduction

This article will walk you through the steps required to install OpenLiteSpeed on AlmaLinux 8.

OpenLiteSpeed is LiteSpeed Technologies lightweight and open-source version of the LiteSpeed Server. OpenLiteSpeed is a user-friendly open-source package that combines speed, security, scalability, optimization, and simplicity.

Prerequisites

  • A system with AlmaLinux 8 installed and running.

  • root access to the system.

First, update your existing list of packages:

yum update

Install OpenLiteSpeed

OpenLiteSpeed hosts its code on its own repository so add this repository to the package manager using below command,

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

Update the list of repositories to update the newly added repository,

yum update 

Install Openlitespeed using below command,

yum install openlitespeed

After installation completed check status using below command to check it's correctly working or not,

systemctl status lsws

Output:

root@vps:~# systemctl status lsws
● lshttpd.service - OpenLiteSpeed HTTP Server
     Loaded: loaded (/etc/systemd/system/lshttpd.service; enabled; vendor prese>
     Active: active (running) since Tue 2022-10-11 18:50:13 UTC; 20s ago
    Process: 41702 ExecStart=/usr/local/lsws/bin/lswsctrl start (code=exited, s>
   Main PID: 41729 (litespeed)
     CGroup: /system.slice/lshttpd.service
             ├─41729 "openlitespeed (lshttpd - main)"
             ├─41740 "openlitespeed (lscgid)"
             ├─41769 "openlitespeed (lshttpd - #01)"
             ├─41770 "openlitespeed (lshttpd - #02)"
             └─41771 lsphp "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "

Configure Firewall

Allow TCP ports using below command,

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

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

Output:

[root@vps ~]# firewall-cmd --zone=public --permanent --add-port=7080/tcp
success
[root@vps ~]# firewall-cmd --zone=public --permanent --add-port=8088/tcp
success

Reload the firewall to apply the changes,

firewall-cmd --reload

Output:

[root@vps ~]# sudo firewall-cmd --reload
success

You can check the OpenLiteSpeed dashboard through port: 8888,

http://Your_IP_address:8088

image

Replace the IP_address with the actual IP of the server.

To check GUI-based dashboard use port: 7080

http://your_server_ip:7080

image

Installing MariaDB

After OpenLiteSpeed running on the server now you can setup the DataBase server to store, manage the data on your website,

Install MariaDB server using below command,

yum install mariadb-server -y

Now complete the MariaDB server setup using below command,

mysql_secure_installation

Output:

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

To Install PHP

yum install epel-release

yum install lsphp81 lsphp81-common lsphp81-mysqlnd lsphp81-gd lsphp81-process lsphp81-mbstring lsphp81-xml lsphp74-mcrypt lsphp81-pdo lsphp81-imap
lsphp81-soap lsphp81-bcmath

Check the current version of php using below url,

http://your_server_IP:8080/phpinfo.php

image

Configuring OpenLiteSpeed

Configure the OpenLiteSpeed GUI server using port 7080:

http://your_server_ip:7080

image

Now, set the administrator accouont credentials using below command,

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

The login details are different from what you set earlier, they will work only for the GUI panel server, The above command will prompt you to enter username and password,

root@vps:~# /usr/local/lsws/admin/misc/admpass.sh

Please specify the user name of administrator.
This is the user name required to login the administration Web interface.

User name [admin]: admin

Please specify the administrator's password.
This is the password required to login the administration Web interface.

Password: 
Retype password: 
Administrator's username/password is updated successfully!
root@vps:~# 

After set, now you can configure the server to use specified version, using below url,

http://your_server_ip:7080

log into the panel using the credentials you just set up and you will get the dashboard like this,

image

If you want to restart the server you can restart using the button on the top right corner like below,

image

image

Done


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS