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
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
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
Next, start and enable the MariaDB database system so that it automatically starts when our server boots.
# systemctl start mariadb # systemctl enable mariadb
Now we can run a simple security script to secure MariaDB installation by setting a new administrative password and locking down some insecure defaults.
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
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.
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
Once you are happy with the default OpenLiteSpeed’s web page, you can now access your administrative interface using HTTPS at
Once you authenticate, you will be granted with the OpenLiteSpeed administration 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.
4 thoughts on “How To Install the OpenLiteSpeed Web Server on CentOS 8”
Hi, it is a great tutorial, but I want to share my experience with it.
When I using command:
there are error like below:
But it’s can solved by using
--nobest, then installation is smooth.
My Question is where is the folder work project
Any anwers is much appreciated!
The default document root is
/usr/local/lsws, but you can use any path for virtual hosting like
If you wanted to try openlitespeed, go with the openlitepanel.com script. It’s simple and handles all your settings with a simple click.
I also got the same issue, but before I install openlitespeed, I installing the EPEL repo first.