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.

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.

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.

Install MariaDB in CentOS 8

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

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.

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.

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.

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.

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

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.

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.

OpenLiteSpeed Admin Login

Once you authenticate, you will be granted with the OpenLiteSpeed administration 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.

This content was originally published here.