OpenLiteSpeed is a high-performance, scalable, open-source Web Server developed by Litespeed technologies. It is apache drop-in replacement as it can be replaced apache web server without any major change. OpenLiteSpeed contains all the essential features right out of the box from LiteSpeed web server. In WordPress, OpenLiteSpeed along with LSCache plugin is the best choice as it helps to reduce the server’s response time. Below we see the benchmark result from LIteSpeed blog where it shows how OpenLiteSpeed handles 10,000 requests over 100 concurrent users. The larger the number, the better.
(Source: https://blog.litespeedtech.com/2018/03/05/compare-openlitespeed-to-nginx-and-apache/)
In this tutorial we will install OpenLiteSpeed Web Server, PHP 7.3 & MySQL. Also we tune the PHP configuration so that it performs better. Don’t worry. I developed a script that automate all the processes for us. This script currently works on fresh installed Debian 8/9 and CentOS 7 system.
Let’s begin
Install OpenLiteSpeed, PHP 7.3 with dependencies & MySQL
-
First login to your server via ssh.
-
Now get the root access
|
|
- Download the OpenLiteSpeed installer script from the github repository
|
|
- Setting the require permission
|
|
- Executing the script
|
|
Now the script will update the system and install the packages. After installing the mariadb, the script will prompt you to enter a default root password. By default there is no password is set. So simply press enter to enter into mariadb server and set/change new password by pressing ‘y’.
|
|
y
|
|
y
|
|
y
|
|
y
|
|
y
|
|
Installation is success. Open web browser and browse http://SERVER_IP:7080/ to enter the web admin panel. The script should automatically get the server IP for you.
Changing default Web admin panel password
- When you will visit the web admin panel for the first time, you will see a warning. That’s normal as there is no valid SSL certificate is configured. Click “Advanced” and click “Proceed”.
- Login as admin & 123456 & you will see the OpenLiteSpeed control panel
- To change the default credentials, click “WebAdmin Settings” from left panel and navigate to “Users” tab. Now click the edit icon.
- Now simply change your username and password. When done, click the save icon
Changing PHP version
Now we need to set the correct PHP version. By default OpenLiteSpeed uses PHP version 5. We need to make a few changes so that web server can use PHP version 7.3.
-
Go to “Server Configuration” > “External App” tab and click “Add” icon
-
Select “LiteSpeed SAPI App” and click “Next”
-
Now set the values like below:
|
|
- Save the settings
- Next, click “Server Configuration” > “Script Handler” tab
- Set required settings and click the save icon
|
|
Changing OpenLiteSpeed default web server port
OpenLiteSpeed uses port 8088 for web server. However, HTTP normally listens to port 80. Let’s change the port.
-
Go to “Listeners” option from left panel and click “View” icon on the default listener
-
In the “Address Settings”, click edit icon and change the port from 8088 to 80. Save the change
-
Finally click the “Reload” to apply all the changes
The server will restart gracefully and redirect you to the sign in form.
Optional steps
If you want to verify PHP version, you can type the below command:
|
|
Similarly, to check MySQL version
|
|
Congratulation! You have successfully installed OpenLiteSpeed Web Server in your system. Now you can either add a domain name or install WordPress on your server.