LinuxTutorialsUbuntu

How To Install OpenLiteSpeed on Ubuntu 16.04

Install OpenLiteSpeed on Ubuntu 16.04

In this tutorial, we will show you how to install and configuration of OpenLiteSpeed on your Ubuntu 16.04 server. For those of you who didn’t know, OpenLiteSpeed is an open-source HTTP server developed by LiteSpeed Technologies. OpenLiteSpeed is a high-performance and lightweight HTTP server which comes with a Web Gui administration interface.  As far as Linux web servers are concerned, OpenLiteSpeed has some interesting features that make it a solid choice for many installations. It features Apache compatible rewrite rules, a web administration interface, and customized PHP processing optimized for the server.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation OpenLiteSpeed on a Ubuntu 16.04 (Xenial Xerus) server.

Prerequisites

  • A server running one of the following operating systems: Ubuntu 16.04 (Xenial Xerus).
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install OpenLiteSpeed on Ubuntu 16.04

Step 1. First, make sure that all your system packages are up-to-date by running the following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Preparing your server, you need to install the following packages:

apt-get install build-essential libexpat1-dev libgeoip-dev libpng-dev libpcre3-dev libssl-dev libxml2-dev rcs zlib1g-dev

Step 2. Installing OpenLitespeed.

The first thing to do is to go to OpenLitespeed’s download page and  download the latest stable version of OpenLitespeed, At the moment of writing this article it is version 1.7.14:

wget https://openlitespeed.org/packages/openlitespeed-1.7.14.src.tgz

Unpack the OpenLitespeed archive to the document root directory on your server:

tar xzvf openlitespeed*
cd openlitespeed*

Then use the following command to configure the software and compile it, This will install the entire OpenLiteSpeed system under the /usr/local/lsws location:

sudo ./configure
sudo make
sudo make install

Step 3. Configuring MariaDB for OpenLiteSpeed.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. You should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB.

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Step 4. Configure the OpenLiteSpeed web server.

OpenLiteSpeed has an Admin Gui for management, so we will configure the admin password for the openLiteSpeed GUI, We will start by changing the administrative password using the following command:

sudo /usr/local/lsws/admin/misc/admpass.sh

You will be asked to optionally provide a username for the administrative user. If you just press ENTER, the username “admin” will be selected. Afterward, you will be asked to select and confirm a new password for the account.

After changing the password and the username use the following command to start the webserver:

sudo service lsws start

Step 5. Accessing OpenLiteSpeed.

OpenLiteSpeed will be available on HTTP port 8080 by default and admin login using port 7080. Open your favorite browser and navigate to http://your-domain.com:8080 or https://server-ip:7080 and complete the required steps to finish the installation. If you are using a firewall, please open ports 7080 and 8080 to enable access to the control panel.

Congratulations! You have successfully installed OpenLiteSpeed. Thanks for using this tutorial for installing the OpenLiteSpeed web server on your Ubuntu 16.04 (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official OpenLiteSpeed website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

Save

Save

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button