How to Install OpenLiteSpeed on Ubuntu 20.04 - TechvBlogs

How to Install OpenLiteSpeed on Ubuntu 20.04

This blog will learn how to install OpenLiteSpeed Server on Ubuntu 20.04 along with PHP 8.0 and MariaDB.


Smit Pipaliya - Author - TechvBlogs
Smit Pipaliya
 

2 years ago

TechvBlogs - Google News

What is LiteSpeed Web Server?

Litespeed Web Server is one of the best and most well-known web server software in the world. Some sources also mention that this webserver is ranked 4 as the most famous and popular web server today. LSWS is a product made by LiteSpeed ​​Technologies which was released in 2003.

The software has the same working system as Apache because the purpose of its release is to replace the software. This is what makes LSWS increasingly popular because websites before LSWS do not have to be reformatted to get the same appearance after using LSWS.

LSWS has a control panel that is easier to use than Apache. This software also acts as a replacement for Apache program functions and provides an event-driven approach in order to be able to run certain commands.

By using the event-driven approach, the format calibration system will not be as complicated as when using Apache which is famous for its many special formats. Not to mention that the format is also easy to learn and control even for beginners.

Features of LiteSpeed Web Server

  • Event-Driven Architecture
  • Apache Drop-In Replacement
  • HTTP/2 & QUIC Support
  • Zero Downtime Maintenance
  • CloudLinux Integration
  • Fastest PHP Available
  • Use with cPanel, Plesk, DirectAdmin, CyberPanel, etc
  • Unlimited Concurrent Connections
  • Mod_Security Compatible

Advantages of LiteSpeed Web Server

  • The hardware required is not too big
  • Easy to learn
  • Provide excellent customer service and community
  • Transactions are easier than Apache format
  • More guaranteed safety quality

This blog will learn how to install OpenLiteSpeed Server on Ubuntu 20.04 along with PHP 8.0 and MariaDB.

Prerequisites

  • The operating system running Ubuntu 20.04 Linux
  • A root or non-root user with Sudo privileges
  • Has stable internet connection
  • Terminal window / Command line

Read Also: How To Install WordPress with LAMP on Ubuntu 20.04

1. Install OpenLiteSpeed

First, download the OpenLiteSpeed repository script.

#! /bin/bash
wget http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh

Run the script.

#! /bin/bash
sudo bash enable_lst_debian_repo.sh

The script will automatically download repository files and update your server.

Then, Install OpenLiteSpeed. Run the following command:

#! /bin/bash
sudo apt-get install openlitespeed -y

The -y flag in the command will automatically allow the server to install OpenLiteSpeed. If you don’t add the -y flag, it will simply ask you for confirmation.

Once you install OpenLiteSpeed, then start the OpenLiteSpeed service and enable it to start at system reboot. Run the following command:

#! /bin/bash
sudo systemctl enable lshttpd
sudo systemctl start lshttpd

Next, verify the status of OpenLiteSpeed, Run the following command:

#! /bin/bash
sudo systemctl status lshttpd

How to Install OpenLiteSpeed on Ubuntu 20.04 - TechvBlogs

You can also verify the OpenLiteSpeed version. Run the following command:

#! /bin/bash
sudo /usr/local/lsws/bin/openlitespeed -v
LiteSpeed/1.7.15 Open (BUILD built: Tue Feb 22 16:27:52 UTC 2022) 
	module versions:
	lsquic 3.0.4
	modgzip 1.1
	cache 1.64
	mod_security 1.4

2. Install MariaDB Server

You can install the MariaDB server and client package, Run the following command:

#! /bin/bash
sudo apt-get install mariadb-server mariadb-client -y

The -y flag in the command will automatically allow the server to install MariaDB. If you don’t add the -y flag, it will simply ask you for confirmation.

Once you install MariaDB, then start the MariaDB service and enable it to start at system reboot. Run the following command:

#! /bin/bash
sudo systemctl start mariadb
sudo systemctl enable mariadb

You can verify the installed version of MariaDB. Run the following command:

#! /bin/bash
mariadb --version
mariadb  Ver 15.1 Distrib 10.3.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Read Also: Laravel 9 Authentication Tutorial

3. Install PHP 8.0 And Enable PHP 8.0 Support

By default, the latest version of PHP is not available in OpenLiteSpeed. When writing this blog, the newest version of PHP is 8.0. You can install the PHP 8.0 by running the following command:

#! /bin/bash
sudo apt-get install lsphp80 lsphp80-mysql lsphp80-common lsphp80-opcache lsphp80-curl -y 

The -y flag in the command will automatically allow the server to install PHP 8.0. If you don’t add the -y flag, it will simply ask you for confirmation.

Once installed, you will need to create a symbolic link of the installed package:

#! /bin/bash
sudo ln -sf /usr/local/lsws/lsphp80/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5

Next, restart OpenLiteSpeed, Run the following command:

#! /bin/bash
sudo systemctl restart lshttpd

4. OpenLiteSpeed Port Change

By default, OpenLiteSpeed listens on port 8088. You can check it using the following command:

#! /bin/bash
ss -antpl | grep 8088
LISTEN    0         4096               0.0.0.0:8088             0.0.0.0:*        users:(("litespeed",pid=9418,fd=9),("litespeed",pid=9414,fd=9))                
LISTEN    0         4096               0.0.0.0:8088             0.0.0.0:*        users:(("litespeed",pid=9417,fd=8),("litespeed",pid=9414,fd=8))

It is recommended that you change the default port to 80. To do so, edit the OpenLiteSpeed default configuration file:

#! /bin/bash
sudo nano /usr/local/lsws/conf/httpd_config.conf

Find the following line:

address                  *:8088

And, replaced it with the following line:

address                  *:80

After updating your httpd_config.conf file, press CTRL+XY, and Enter key to save the httpd_config.conf file.

Next, restart OpenLiteSpeed, Run the following command:

#! /bin/bash
sudo systemctl restart lshttpd

Now, open your web browser and type the URL http://your-server-ip-address. You should see the OpenLiteSpeed default page:

How to Install OpenLiteSpeed on Ubuntu 20.04 - TechvBlogs

5. Create Admin User In OpenLiteSpeed

To access the Administrative dashboard, you need to set a username and password. To accomplish this, run the following command:

#! /bin/bash
sudo /usr/local/lsws/admin/misc/admpass.sh

How to Install OpenLiteSpeed on Ubuntu 20.04 - TechvBlogs 

Be sure to specify the username and password for the Admin user. Once done, visit the URL shown.

https://your-server-ip-address:7080

How to Install OpenLiteSpeed on Ubuntu 20.04 - TechvBlogs

Provide your admin username, password, and click on the Login button. You should see the OpenLiteSpeed default dashboard on the following screen:

How to Install OpenLiteSpeed on Ubuntu 20.04 - TechvBlogs

Thank you for reading this blog.

Read Also: How to get a Client IP address in Laravel

If you want to manage your VPS / VM Server without touching the command line go and  Checkout this linkServerAvatar allows you to quickly set up WordPress or Custom PHP websites on VPS / VM in a  matter of minutes.  You can host multiple websites on a single VPS / VM, configure SSL certificates, and monitor the health of your server without ever touching the command line interface.

If you have any queries or doubts about this topic please feel free to contact us. We will try to reach you.

Comments (0)

Comment


Note: All Input Fields are required.