Methods of payment Abuse

How to install OpenLiteSpeed on Ubuntu 20.04

03.01.2023, 22:42

OpenLiteSpeed is a web-server that is used to manage sites of various complexity (including highly loaded projects). OpenLiteSpeed is an analog of Apache and Nginx, which is positioned as super-fast: memory consumption is minimal, but maximum performance is ensured.

To install OpenLiteSpeed on a virtual machine running Ubuntu 20.04, you need to perform a number of actions.

Step-by-step instructions for installing OpenLiteSpeed:

  1. Prepare the server and add (create) a non-root user.
  2. Install OpenLiteSpeed on the virtual machine (server).
  3. Configure the firewall (http and https, ports 7080 and 8088).
  4. Create an administrator account.
  5. Connect the OpenLiteSpeed web server and start interacting through the web interface.

Step #1. Prepare the server (virtual machine) for OpenLiteSpeed installation

  1. Log out of the account with root privileges.
  2. Create an account without administrator privileges.
  3. Update packages and test them ($ sudo apt update).

Step #2. Install OpenLiteSpeed on a virtual machine (server)

There is no OpenLiteSpeed in the Ubuntu 20.04 repository. So you will need to perform additional steps to add it.

  1. Go to the tmp directory (the command looks like $ cd /tmp).
  2. Run the download from the official site $ curl -LO http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh (if curl is not installed, you need to roll it).
  3. Run the downloaded file with the command $ sudo bash enable_lst_debian_repo.sh.
  4. If everything was successful, you will see the information about the downloaded repo. Now all that's left is to install the web server with the classic command:
$ sudo apt install openlitespeed

Step #3. Configure the firewall (http and https, ports 7080 and 8088)

You can check which protocols and applications are allowed with a simple query:

$ sudo ufw status

The user will see the status, protocols, allowed/not allowed, from where access is possible.

For example, there are often situations when access is allowed only via ssh (Secure Shell Protocol).

That is, the system administrator must additionally enable the http and https protocols. Ports 7080 (for web interface) and 8088 (for default page) are also required.

The $ sudo ufw allow command is used to configure the protocols (for example, $ sudo ufw allow http provides support for the application layer protocol HyperText Transfer Protocol).

To configure ports, the command is used:

$ sudo ufw allow 7080/tcp

To check ports/protocols and their status, use the command:

$ sudo ufw status.

Step #4. Create an administrator account

To create an administrator account to work with OpenLiteSpeed on Ubuntu 20.04, we use the command:

$ sudo /usr/local/lsws/newuseradmin/misc/admpass.sh

Login newuseradmin we set up as an example. You can use other names.

Next, you will need to follow the instructions in the terminal (set password, confirm, etc.).

Step #5. Connect the OpenLiteSpeed web server and start communicating via the web interface

In the steps above, we installed OpenLiteSpeed and configured how it works. Now all that's left is to connect to the webserver.

The default settings are that OpenLiteSpeed is available on port 7080. This means that in the browser you will need to go to the URL in the format http://IP-адрес of your virtual server:7080. Next, enter the login and password of the user created at the previous stage for authorization.

After authorization the user gets to the main page of the OpenLiteSpeed web-interface. All that remains is to make the necessary settings: change the default port, configure restart and so on (if necessary). When you have changed the default port, you can enter the IP address of the VPS and get to the start page of the site running on OpenLiteSpeed.

It's done! You have managed to install OpenLiteSpeed on Ubuntu 20.04 and provide a full-fledged web server. The web interface is used to manage the OpenLiteSpeed settings. After making the startup settings, you can study the documentation and set additional parameters for operation.