OpenLiteSpeed is a web server that can be used to speed up dynamic content delivery. It also features a built-in caching system for static content.
OpenLiteSpeed is faster, consumes less memory, and requires fewer resources than Apache. It’s more secure because the source code is available for inspection, which means that bugs can be found and fixed quickly. OpenLiteSpeed uses Event MPM, so that it will scale on multicore servers better than Apache with Worker MPM. Since Event MPM has been around longer, it’s also more mature, so there are fewer known issues people might run into when using OpenLiteSpeed compared to apache.
When configured properly OpenLiteSpeed can handle a lot of connections at once.
OpenLiteSpeed can be used as either a standalone web server by itself, in front of Apache, Nginx, or other web servers, or it can also sit behind another web server. You can use it with PHP-FPM to make your site super fast.
If you’re looking for a way to increase your internet speed without having to do anything, then you need open lite speed. In this guide, we will walk you through the steps you need to take in order to install it on an AlmaLinux 8 system.
Prerequisites
- A fresh install of AlmaLinux 8. Installing AlmaLinux 8 and OpenLiteSpeed may be slightly different on other distributions, but the process should be very similar.
- Sudo access to your AlmaLinux installation. This will make it possible for you to install OpenLiteSpeed and enable its service.
- An internet connection. You’ll need this to download the required packages.
Step 1. Updating the System
First, we want to make sure that all your packages are up-to-date. This helps OpenLiteSpeed work even better by upgrading the available packages.
sudo dnf update
sudo dnf install epel-release
Step 2. Uninstalling Apache Server
Apache is part of the LAMP and LEMP stacks. Since we are replacing Apache with OpenLiteSpeed, you will have to uninstall it. You can skip this step if you don’t have Apache installed.
First, stop the current instance of Apache.
sudo systemctl stop httpd.service
Now that it’s stopped, the httpd packages are still installed on the system. You have to remove them.
sudo dnf remove "httpd*"
Next, remove the supporting files, httpd modules, and configuration files.
rm -rf /etc/httpd rm -rf /usr/lib64/httpd
To ensure that no remnants of Apache remain on your system, you can do a complete check by checking its status.
sudo systemctl status httpd
Step 3. Installing OpenLiteSpeed
Now that you’ve completely removed Apache, you can proceed to install OpenLiteSpeed.
To begin with, we’ll add the repository that contains the OpenLiteSpeed package. Doing this will help you get the latest OpenLiteSpeed packages and dependencies. We will add the repository from the developer using the rpm command.
sudo rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm
Once that you’ve added the repo, update the system so that it can identify all the repositories.
sudo dnf update
Now, install the openlitespeed packages release version by typing:
sudo dnf install openlitespeed lsphp74
Once the installation is complete, you can verify the version of OpenLiteSpeed that has been installed by checking its status.
sudo systemctl status lsws
You should see output like this.
If the OpenLiteSpeed server is not running, you can manually start it by typing the following command.
sudo systemctl start lsws
Finally, to make sure OpenLiteSpeed comes up when AlmaLinux 8 boots. Enable the OpenLitespeed service.
sudo systemctl enable lsws
Step 4. Configuring the Firewall
OpenLiteSpeed makes use of a few non-standard ports. OpenLiteSpeed uses port 7080 for the Web Panel. OpenLiteSpeed uses port 8080 for http requests from clients.
If your firewall is enabled, you’ll need to allow those ports through. However, if your firewall is disabled, then you’re all set!
sudo firewall-cmd --add-port={8088/tcp,7080/tcp} --permanent
You must restart all firewalls for these changes to take effect.
sudo firewall-cmd --reload
To verify that the changes have been made, use the following command.
sudo firewall-cmd --list-all
You should see a result similar to this.
Step 5. Configuring OpenLiteSpeed
The admpass.sh script is used to configure the server. It can be used for many different purposes. In this case, we will use it to set up an anonymous account and a password for your admin web console. The default password for the admin web console is 123456. You need to update the password to a more secure one before continuing.
If you forgot your password or lost the password. You can also use this script to reset the password.
/usr/local/lsws/admin/misc/admpass.sh
You should see the following output. Provide a username and a password. Press Enter to ensure you update it with a secure password.
Step 6. Accessing OpenLiteSpeed Web UI
Now that OpenLiteSpeed is installed, you can access the OpenLiteSpeed default page using the following URL in your browser.
http://<IP-address>:8088/
Where: <IP-address> is the actual IP address of your machine.
To find your server IP address, type the following command.
ip a
If everything has been installed correctly, you should see a default OpenLiteSpeed page similar to the below image.
You can click on the Demo section on the OpenLiteSpeed web page to see what you can do with your OpenLiteSpeed server.
To access your administrative interface, use the following URL.
http://<IP-address>:7080/
You will see a Your connection is not private message. This is perfectly normal because you’re not using SSL to access the OpenLiteSpeed web panel.
Click on the Show Advanced settings link.
On the next page, click on the Proceed to (unsafe) link at the bottom left.
You should see a default OpenLiteSpeed administrative interface login screen similar to the image below. Provide the username and the password you set earlier in the admpass.sh script. Click the Login button.
After the authorization, you will be taken to the administrative interface of the OpenLiteSpeed server. From here, you can use this dashboard to configure your OpenLiteSpeed server as well as upload the content for webs
The OpenLiteSpeed installation is now complete.
Conclusion
In this tutorial, you have learned how to install OpenLiteSpeed on a Linux AlmaLinux 8 system. You may be interested in How to Install OpenLiteSpeed Web Server on Ubuntu 20.04