Install and Configure OpenLiteSpeed on Centos 7

In this guide, we intend to teach you How To Install and Configure OpenLiteSpeed on Centos 7.

OpenLiteSpeed is an easy-to-use, open-source web server. It offers unbeatable features and performance to your sites along with top-notch security.

The server understands all the apache rewrite rules and has intelligent cache acceleration features that let you implement the fastest caching on your server. Apart from all these, you get to install a customized PHP processor that is optimized for the OpenLiteSpeed server.

Steps To Install OpenLiteSpeed on Centos 7

To install OpenLiteSpeed, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide the Initial Server Setup with Centos 7.

Then, you need to set up a basic firewall on your server. You can follow this guide on Setting up a Firewall with firewalld on Centos 7.

Now follow the steps below to complete this guide.

Installing OpenLiteSpeed on Centos 7

First, you need to update your local package index with the following command:

sudo yum update -y

Then, you need to install the Epel repository on Centos 7:

sudo yum install epel-release -y

Next, you need to add the OpenLiteSpeed repository on your server with the command below:

rpm -Uvh

Now you can use the following command to install OpenLiteSpeed:

sudo yum install openlitespeed -y

OpenLieSpeed will start automatically during your installation.

Verify that your OpenLiteSpeed web server is active and running on Centos 7 with the following command:

sudo systemctl status lsws

In your output you will see:

● lshttpd.service - OpenLiteSpeed HTTP Server
Loaded: loaded (/usr/lib/systemd/system/lshttpd.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2022-08-28 07:44:36 EDT; 3s ago
Process: 8170 ExecStart=/usr/local/lsws/bin/lswsctrl start (code=exited, status=0/SUCCESS)
Main PID: 8194 (litespeed)
CGroup: /system.slice/lshttpd.service
├─8194 openlitespeed (lshttpd - main)
├─8203 openlitespeed (lscgid)
├─8228 openlitespeed (lshttpd - #01)
├─8229 openlitespeed (lshttpd - #02)
└─8230 lsphp

Note: If your web server is not active on your server, you can start it with the command below:

/usr/local/lsws/bin/lswsctrl start.

Install PHP 8.1 on Centos 7

At this point, you can use the following command to install PHP 8.1 for OpenLiteSpeed from its repository with all commonly-used packages, and direct OpenLiteSpeed to use this PHP:

sudo yum install lsphp81 lsphp81-common lsphp81-mysql lsphp81-gd lsphp81-process lsphp81-mbstring lsphp81-xml lsphp81-mcrypt lsphp81-pdo lsphp81-imap lsphp81-soap lsphp81-bcmath

Configure OpenLiteSpeed on Centos 7

At this point, you need to change the default password of the Admin user to log in to the administration Web interface. To do this run the following command:


You will be asked to enter your admin username and set a password.

In your output you will see:

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.
Retype password:
Administrator's username/password is updated successfully!

Here we assumed that you have enabled the firewalld. Now run the commands below to open the OpenLiteSpeed ports through the Centos 7 firewall:

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

To apply the changes reload the firewall:

sudo firewall-cmd --reload

Access OpenLiteSpeed Admin Web Interface

At this point, you can access your OpenLiteSpeed Admin panel on Centos 7 by typing your server’s IP address in your web browser followed by 7080:


You will see the OpenLiteSpeed login screen, enter your credentials and click on the Login button.

OpenLiteSpeed login screen

Then, you will see your OpenLiteSpeed Admin dashboard:

OpenLiteSpeen Admin dashboard

That’s it, you are done.


At this point, you learn to Install and Configure OpenLiteSpeed on Centos 7.

Hope you enjoy it.

You may be interested in these articles:

How To Install and Use Mono on Centos 7

Install Brotli Compression on Centos 7

Set up Rust Programming Language on Centos 7

How To Install and Use XAMPP on Centos 7

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!