Want to install OpenLiteSpeed Webserver on Ubuntu? Today we’re going to do just that.
The OpenLiteSpeed web server is an open-source server renowned for its lightweight nature and high performance.
Developed by LiteSpeed Technologies, it brings an online GUI to help the users administrate their web servers. The OpenLiteSpeed web server is highly optimized and runs smoothly without consuming a lot of system resources.
With its low overhead and easily scalable structure, OpenLiteSpeed has grown its user base over the years. In this tutorial, we will guide you to install the OpenLiteSpeed web server on Ubuntu.
Before we begin the tutorial to install OpenLiteSpeed webserver on Ubuntu, we need to make sure that we have the latest available repositories. To do this, we will update our default repositories using the apt package management service.
Firstly, you need to open the terminal on your Ubuntu system and type the following.
sudo apt update
How to install OpenLiteSpeed Webserver on Ubuntu
It is time to install Openlitespeed webserver on Ubuntu. To do so, you need to follow the steps below
Add OpenLiteSpeed Repository to Ubuntu
To install Openlitespeed webserver on Ubuntu, we need to first download the necessary repository keys. This can be done by downloading the official installation archive from openlitespeed.org and unpacking it. Alternatively, we can do this directly through the command line.
First, we need to download the Openlitespeed repository and add the signing key of the developer to it. This can be done using the following command.
wget -qO - https://rpms.litespeedtech.com/debian/lst_repo.gpg | sudo apt-key add -
Now, we would add the information of the Openlitespeed repository to our system. To do so, we use this command.
sudo add-apt-repository 'deb http://rpms.litespeedtech.com/debian/ bionic main'
Now, the required repositories are added to our package cache. You might have noticed that the command has a URL which points to a Debian package.
However, there is no need to worry as LiteSpeed Technologies offers a common package for both Debian and Ubuntu distributions.
Install OpenLiteSpeed Webserver on Ubuntu using APT
Now that we have the required repository, we can install Openlitespeed web server on Ubuntu.
We also need to install the PHP processor along with our web server. We will use the following command to install both on our system.
sudo apt install openlitespeed lsphp73
Now, we will create a soft link pointing at the PHP processor which we installed with Openlitespeed web server.
This ensures that our Openlitespeed web server uses the correct version of PHP. The soft link can be created using the ln command.
sudo ln -sf /usr/local/lsws/lsphp73/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5
Set up OpenLiteSpeed
Once we install Openlitespeed webserver on Ubuntu, we need to set up administrative credentials.
The default username is ‘admin’ while the default password is 123456.
Hence, we need to change them before we get our server online for testing. To change the security credentials, we run a script named admpass.sh.
This script is available in the Openlitespeed files. We can run it using the following command.
Once we run the script, we will be prompted to choose a username for the server admin. Once we enter it, we need to enter a password for our admin account and confirm it.
If we leave a field empty, the default entry will be used. Once you update the username and password, the script will confirm that it was successful.
Once we update the login credentials, our Openlitespeed server is secure to be tested. Now we will start the Openlitespeed server using the command lswsctrl.
sudo /usr/local/lsws/bin/lswsctrl start
To make our Openlitespeed web server reachable, we need to open the port 8088 and 7080 on the firewall for our server. We do so using the ufw command as shown below.
sudo ufw allow 8088 sudo ufw allow 7080
The port 8088 will serve as the default port for our Openlitespeed web server. Whereas, the port 7080 will govern access to the admin interface.
With this, you were successful to install Openlitespeed web server on Ubuntu and set it up. It is time to test our server.
Verify our installation
Once we install Openlitespeed webserver on Ubuntu, we need to verify our installation. To do so, simply enter the following in your browser.
If your installation and configuration were successful, you should see the page shown above. If you wish to check the admin interface, it can be done by entering this in your browser.
Note: You might be warned of a security risk due to a self-signed certificate. However, you don’t need to worry about it. Simply advance to the web page.
You will be prompted to enter the username and password. Entering the credentials will give you access to the admin interface.
Openlitespeed is a highly optimised web server created by LiteSpeed Technologies. It can be managed through the admin interface available with the server.
Exploring the default Openlitespeed webpage and the admin interface will provide you numerous methods to configure the server as per your preferences.
We hope this tutorial was able to help you install Openlitespeed web server on Ubuntu and set up basic configurations. If you have any feedback, queries or suggestions, feel free to reach out to us in the comments below.