How To Install the OpenLiteSpeed Web Server on CentOS 8

OpenLiteSpeed is an open-source, high-performance and lightweight HTTP web server that comes with a web administration interface to manage and serve web sites.

As far as concerned about Linux web servers, OpenLiteSpeed has some impressive features that make it a preferred choice for many installations, as it comes with Apache compatible rewrite rules and optimized PHP processing for the server that can handle thousands of concurrent connections with low CPU and Memory consumption.

In this article, we will guide you through the process of installing and configuring OpenLiteSpeed on CentOS 8 server with PHP processor and MariaDB database management system.

Add the OpenLiteSpeed Repository

To install the latest version of OpenLiteSpeed, you need to add the official repository information to our system by running.

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

Install OpenLiteSpeed Repository

The above rpm command will update the list of yum repositories that we reference when searching for and installing software packages on the system.

Installing OpenLiteSpeed Web Server

Once we have OpenLiteSpeed repository enabled on the system, we can install the latest version of the OpenLiteSpeed web server by running.

# yum install openlitespeed
Install OpenLiteSpeed in CentOS 8

Install OpenLiteSpeed in CentOS 8

Note: The default OpenLiteSpeed installation directory is /usr/local/lsws.

Installing and Securing MariaDB Database System

Now install the MariaDB database management system by running the following command.

# yum install mariadb-server
Install MariaDB in CentOS 8

Install MariaDB in CentOS 8

Next, start and enable the MariaDB database system so that it automatically starts when our server boots.

# systemctl start mariadb
# systemctl enable mariadb
Start and Enable MariaDB Service

Start and Enable MariaDB Service

Now we can run a simple security script to secure MariaDB installation by setting a new administrative password and locking down some insecure defaults.

# mysql_secure_installation
Secure MariaDB in CentOS 8

Secure MariaDB in CentOS 8

Installing PHP Preprocessor

To install the latest version of PHP 7.x, you need to enable the EPEL repository, which will install PHP 7.3 from OpenLiteSpeed repository with all commonly-used PHP packages that will enough to run the most commonly used web applications.

# yum install epel-release
# yum install lsphp73 lsphp73-common lsphp73-mysqlnd lsphp73-gd lsphp73-process lsphp73-mbstring lsphp73-xml lsphp73-mcrypt lsphp73-pdo lsphp73-imap lsphp73-soap lsphp73-bcmath
# ln -sf /usr/local/lsws/lsphp73/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5
Install PHP in CentOS 8

Install PHP in CentOS 8

Change the OpenLiteSpeed Default Admin Password

The default password is set to “123456”, we need to change the default password for OpenLiteSpeed by running the following script.

# /usr/local/lsws/admin/misc/admpass.sh
Change OpenLiteSpeed Admin Password

Change OpenLiteSpeed Admin Password

Optionally, you can set a different username for the administrative account or just hit ENTER to keep the default value of “admin”. Then, set a strong password for the administrative user, which is used to manage OpenLiteSpeed from the web interface.

Testing OpenLiteSpeed Web Page and Admin Interface

The OpenLiteSpeed is already up and running, but if you want to start, stop, restart or verify the status of the server, use the standard service command as shown.

# service lsws status

If you are running a firewall on the system, make sure to open ports 8088 and 7080 on the system.

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

Now open your web browser and navigate to the default OpenLiteSpeed’s web page at your server’s domain name or IP address, followed by :8088 port.

http://server_domain_or_IP:8088
OpenLiteSpeed Web Page

OpenLiteSpeed Web Page

Once you are happy with the default OpenLiteSpeed’s web page, you can now access your administrative interface using HTTPS at :7080 port.

https://server_domain_or_IP:7080
OpenLiteSpeed Admin Login

OpenLiteSpeed Admin Login

Once you authenticate, you will be granted with the OpenLiteSpeed administration interface.

OpenLiteSpeed Admin Interface

OpenLiteSpeed Admin Interface

That’s It! In this article, we have explained how to install OpenLiteSpeed with an optimized version of PHP, and MariaDB on a CentOS 8 server. OpenLiteSpeed provides high performance, an easy-to-use admin interface, and pre-configured options for running scripts without any errors.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide
The Complete Linux System Administrator Bundle
Become an Ethical Hacker Bonus Bundle

You may also like...

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.